-
Notifications
You must be signed in to change notification settings - Fork 1.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
fix: Model::save() may call unneeded countAllResults() #5439
Conversation
@paulbalandan Is this a human error or php-cs-fixer error? |
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.
I am not sure what happened, but I think it was an error. 😂
Complex conditions cause bugs.
Don't worry. Nobody's perfect. I thought if php-cs-fixer causes this error, we have to check the rule. I don't like long conditions. It is difficult to read and do step debugging. |
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.
The new code looks much better and understandable. 👍
Description
When
useAutoIncrement
is disabled,countAllResults()
is called, even if$data
does not have id value.You'll see the query like the following:
Checklist: