Fixing query generation error when calling save() on an Instance
When the raw value of ```id``` is stored as ```identifier``` in ```save()``` an invalid query is returned from the ```QueryGenerator```. i.e. - Without the fix, an UPDATE query looks like this: ```UPDATE `Users` SET `gender`='male',`email`='updated@bar.com',`updatedAt`='2013-05-29 23:33:36',`createdAt`='2013-05-29 23:33:36' WHERE 2``` The ```WHERE 2``` is not the desired behavior. If ```id``` is wrapped in an object then the correct query is generated: ```UPDATE `Users` SET `gender`='male',`email`='updated@bar.com',`updatedAt`='2013-05-29 23:33:36',`createdAt`='2013-05-29 23:33:36' WHERE `id`=2```
Showing
with
1 additions
and
1 deletions
-
Please register or sign in to post a comment