Closed arturocandela closed 11 years ago
I think it has to do with the fact that the value sorting isn't taking into account the Raw
instances. I'll take a look.
@arturocandela what version of Knex are you seeing this issue with?
Edit: Nevermind, I was able to reproduce it.
This is fixed and should be good to go on the 0.2 release I just cut. Thanks for pointing it out!
Thanks for all! Tomorrow,
If I had time I will upgrade my knex version and test it
2013/8/7 Tim Griesser notifications@github.com
This is fixed and should be good to go on the 0.2 release I just cut. Thanks for pointing it out!
— Reply to this email directly or view it on GitHubhttps://github.com/tgriesser/knex/issues/31#issuecomment-22264251 .
Great, change log is here... http://knexjs.org/#changelog
I have had time and I tested it and works perfectly :)
This is the result:
sql: 'insert into "brigadista" ("alturaabsoluta", "nombre", "posicion") values ($1, $2, ST_Transform(ST_GeometryFromText(\'POINT(-0.475519999981581 38.69480999998364 600)\',4326),32630))',
bindings: [ false, 'Han Solo' ],
__cid: '__cid14' }
I've got a problem when I do an insert, but I do the same think in an update and it works perfectly.
I will try to explain: I'm using, as you suggested me, the Knex.Raw() to run Postgre functions for the updates and the inserts but I have problems with the insert, but not with the update: if i try to add the following js I get an error:
I get the error:
But if I send:
brigadista.alturaabsoluta = false; brigadista.nombre = "DarthVader"; brigadista.posicion = 'ST_Transform(ST_GeometryFromText(\'POINT(-0.475519999981581 38.69480999998364 600)\',4326),32630)'
I think the error is because the properties are sorted but not the values. I'm sorry but I don't have enough time to test this week if the error occurs without Knex.Raw data.