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
Where should not be required in Model#update()
#2340
Comments
Of course, you can do:
My silly. |
Yep, an empty where object was the idea. I made the where required to make the API change |
It's also a pretty good sanity check. |
why then throw a new Error? Line 1584 in 5be3119
options = options || {}; options.where = options.where || {}; I can create a pull request if you want? |
btw this
does not work for me |
The where is required to make sure the user actually wants to update all rows |
query
|
@Feroc1ty seems there's an error in the query generator :) |
I just noticed that providing a
where
parameter in the options passed toModel#update()
is required. The following throws an error:This doesn't allow you to update all rows in a table simultaneously, which sometimes you might want to do. Should this be the case?
The text was updated successfully, but these errors were encountered: