-
-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Noop when update without providing any values #1384
Conversation
@@ -1423,8 +1423,8 @@ mod tests { | |||
vec![ | |||
Transaction::from_sql_and_values( | |||
DbBackend::Postgres, | |||
r#"UPDATE "fruit" SET WHERE "fruit"."id" = $1 RETURNING "id", "name", "cake_id""#, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't know we put such a test case here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. That's bad :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a red flag that sit there silently
PR Info
Closes Syntax Error when saving active model that sets nothing #1376
Dependencies:
Bug Fixes
ActiveModel
with all its value beingUnchanged
orNotSet
, the expected behaviour should be no-op. That's to skip firing any update statement.