-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
$model->update() and $model->save() updates all rows in a table when a primary key is not used #4607
Comments
What is the SQL statement executed? |
Is there a way to log the SQL statement executed? All I ran was: |
You should override However, from the framework point of view, it's better we throw an exception in this case to avoid updating/deleting all rows. Set for 2.0.1 since the change is not trivial and this is a corner case. |
argh. same here. now i know what was going on. like he wrote... |
Issue:
Expected outcome - only selected model should be updated.
The text was updated successfully, but these errors were encountered: