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
The events do however get fired when calling update() on a model instance.
I understand that in the Model.update() case we don't have an instance to pass to the event methods but maybe we could pass the 'data' argument? And maybe add an extra param to the event method to indicate the given obj is a partial or a full instance?
Currently this make the use of Model.update() limited and not practical when registering those events.
In my case, I have defined a beforeSave event to update a 'updated_at' datetime field on model instances. The fact that Model.update() does not fire the event makes this method essentially useless to me. Or should this be handled/implemented in a different way?
Happy to send a pull request if you guys think this could make sense?
The text was updated successfully, but these errors were encountered:
The events do however get fired when calling update() on a model instance.
I understand that in the Model.update() case we don't have an instance to pass to the event methods but maybe we could pass the 'data' argument? And maybe add an extra param to the event method to indicate the given obj is a partial or a full instance?
Currently this make the use of Model.update() limited and not practical when registering those events.
In my case, I have defined a beforeSave event to update a 'updated_at' datetime field on model instances. The fact that Model.update() does not fire the event makes this method essentially useless to me. Or should this be handled/implemented in a different way?
Happy to send a pull request if you guys think this could make sense?
The text was updated successfully, but these errors were encountered: