I'm updating the model like this: Model.update(id, data); and beforeUpdate lifecycle callback is getting called. However, it includes only the data from my call and not the id.
How do I know what entity is being updated? Shouldn't the criteria be passed to the lifecycle callback?
Hello!
I'm updating the model like this:
Model.update(id, data);
andbeforeUpdate
lifecycle callback is getting called. However, it includes only thedata
from my call and not theid
.How do I know what entity is being updated? Shouldn't the criteria be passed to the lifecycle callback?
Thanks.