Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upupdate and set null: There are no changes to save. This query cannot be built #885
Comments
This comment has been minimized.
|
http://docs.diesel.rs/diesel/query_builder/trait.AsChangeset.html
|
fluxxu
closed this
May 5, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fluxxu commentedMay 3, 2017
Which versions of Rust and Diesel are you using?
rustc 1.19.0-nightly (06fb4d256 2017-04-30)
diesel 0.12
Which feature flags are you using?
postgres, chrono, serde
What are you trying to accomplish?
generate a query to update fields to null
e.g.
What is the full error you are seeing?
Because None is a noop:
diesel/diesel/src/query_builder/update_statement/changeset.rs
Line 45 in e52d171
And struct with only None values can not pass this:
diesel/diesel/src/query_builder/update_statement/mod.rs
Line 58 in d44c50f
How can we reproduce this?
define a struct with only Option fields and derive AsChangeset
Then update using this struct
Please quote as much of your code as needed to reproduce (best link to a public repository or a Gist)
N/A
Please post as much of your database schema as is relevant to your error
N/A