Y
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
k__
4131 days ago
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?
link
bulkan
4131 days ago
The create method on model's persist automatically. Build just creates an instance without saving it to the database.
link
k__
4131 days ago
Really? I thought it was the other way around...
link
Couldn't the rest be achieved by simply adding a few (update, delete) methods to the model classes?