Hacker News new | ask | show | jobs
by whatthemick 4131 days ago
I would expect those events to be triggered by action though, then it wouldn't be persistence ignorance.
1 comments

Sequelize has the build method, which persists automatically.

Couldn't the rest be achieved by simply adding a few (update, delete) methods to the model classes?

The create method on model's persist automatically. Build just creates an instance without saving it to the database.
Really? I thought it was the other way around...