balderdashy / waterline-docs

WARNING: The content in this repo is out of date! See https://github.com/balderdashy/sails-docs for the most up-to-date documentation
452 stars 161 forks source link

How do you know what entity is being updated in beforeUpdate lifecycle callback? #130

Closed slavafomin closed 8 years ago

slavafomin commented 8 years ago

Hello!

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?

Thanks.

slavafomin commented 8 years ago

Wrong repo, sorry.