-
Notifications
You must be signed in to change notification settings - Fork 235
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
Why Model::update() doesn't return number of updated rows? #1127
Comments
A few questions that allow us to decide if this feature is needed:
|
I think even this can implement for |
Use cases:
I know I can use Workarounds:
Possible solution: |
Anyway, I'm fine with a BC break, because the current returned value is almost useless. I don't know about document databases but in SQL, returned value is almost always true. maybe only in a connection/database failure we will have a false. |
@farhadi Thanks for detailing use case and workaround. This will need further discussion - as that takes time - the next potential integration point would be after 1.0. |
@DavidPersson In my opinion, if it will cause break BC it is better that it become fixed in version 1.0 |
In most of cases after a
Model::update()
we need the number of updated rows. And we have to tweak the underlying resource to extract the number manually.I have always had this question why this method shouldn't return the number of updated rows out of the box.
If there isn't any technical or logical limitation for this change, I think it's worth a BC break.
The text was updated successfully, but these errors were encountered: