-
Notifications
You must be signed in to change notification settings - Fork 61
Calling destroy() with criteria on a model without a PK defined generates an error on MySQL #23
Comments
@dcaravana was this ever resolved? |
+1 sails@0.11.0 and sails-mysql@0.10.12 |
PR posted: #57. |
👍 @devinivy |
Thanks for posting, @dcaravana. I'm a repo bot-- nice to meet you! It has been 30 days since there have been any updates or new comments on this page. If this issue has been resolved, feel free to disregard the rest of this message. On the other hand, if you are still waiting on a patch, please:
Thanks so much for your help! |
Reopening until #57 is merged. |
Fix not verified (and still on sails 0.10.5), let me know if we should. Thanks everyone. |
Thanks for posting, @dcaravana. I'm a repo bot-- nice to meet you! It has been 30 days since there have been any updates or new comments on this page. If this issue has been resolved, feel free to disregard the rest of this message. On the other hand, if you are still waiting on a patch, please:
Thanks so much for your help! |
Bug with PR pending– reopening. |
Using
sails@0.10.5
andsails-mysql@0.10.11
.This example:
generates the following error:
The bug is in
WhereBuilder.prototype.single
and it's very easy to spotlast two code lines become:
The workaround of adding explicit sorting to criteria doesn't work either, but helps debug since the syntax of the generated SQL statement is not accepted by MySQL:
instead it should be:
Resorting to a SQL statement through
query()
for now.The text was updated successfully, but these errors were encountered: