You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DirtyState is 0 (DIRTY_STATE_PERSISTENT) at any timing and there is no change.
By the way, Products is in initialize ()
$this->useDynamicUpdate(true);
is running.
Also, when $mdl->name = 'Cirsium';, both getChangedFields() and getChangedFields() return array('name').
I expected dirtyState to be 1 (DIRTY_STATE_TRANSIENT) at $mdl->name = 'Cirsium';.
Looking at Model.zep,__SET(string property, value) doesn't seem to change dirtyState for a simple set of values.
Is it okay to change dirtyState only when the value is an array or a relation with another model is set?
Is it wrong to expect dirtyState to change when rewriting a field?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I tried rewriting the field values as follows using the database of the sample application Invo.
DirtyState is 0 (DIRTY_STATE_PERSISTENT) at any timing and there is no change.
By the way, Products is in initialize ()
is running.
Also, when
$mdl->name = 'Cirsium';
, bothgetChangedFields()
andgetChangedFields()
returnarray('name')
.I expected dirtyState to be 1 (DIRTY_STATE_TRANSIENT) at
$mdl->name = 'Cirsium';
.Looking at Model.zep,
__SET(string property, value)
doesn't seem to changedirtyState
for a simple set of values.Is it okay to change
dirtyState
only when the value is an array or a relation with another model is set?Is it wrong to expect dirtyState to change when rewriting a field?
Beta Was this translation helpful? Give feedback.
All reactions