-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
3.2.x Model hasChanged array #12713
3.2.x Model hasChanged array #12713
Conversation
bfe81c5
to
86a14a0
Compare
phalcon/mvc/model.zep
Outdated
@@ -3853,7 +3853,7 @@ abstract class Model implements EntityInterface, ModelInterface, ResultInterface | |||
* | |||
* @param string|array fieldName | |||
*/ | |||
public function hasChanged(var fieldName = null) -> boolean | |||
public function hasChanged(var fieldName = null, boolean allFields = false) -> boolean |
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.
Could you please amend PHPDoc with example and update CHANELOG.md?
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.
Yea i will update changelog once there will be 3.2.x branch cuz i will need to update it then anyway.
cae32fb
to
4ad2aa6
Compare
rebased @sergeyklay |
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.
Could you please fix doc?
phalcon/mvc/model.zep
Outdated
* $robot->type = "hydraulic"; | ||
* $hasChanged = $robot->hasChanged("type"); // returns true | ||
* $hasChanged = $robot->hasChanged(["type", "name"]); // returns true | ||
* $hasChanged = $robot->hasChanged(["type", "name", true]); // returns false |
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.
$robot->hasChanged(["type", "name"], true);
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.
Oh, okay i see space.
4ad2aa6
to
cca9cd1
Compare
Fixed comment. |
cca9cd1
to
1c6a7fb
Compare
39870c4
to
10c2c3f
Compare
10c2c3f
to
090064c
Compare
d8c8fe2
to
5465096
Compare
Rebased @sergeyklay |
de5f52e
to
2fa99a3
Compare
2fa99a3
to
7394bcc
Compare
Rebased @phalcon/framework-team |
Thank you |
Hello!
In raising this pull request, I confirm the following (please check boxes):
Small description of change: This is fixing issue as well adding option to check if array of fields was changed in models with ability to check if all provided fields were changed.
Thanks