Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use model instance in singular patch on postgres #156

Conversation

skinofstars
Copy link

@skinofstars skinofstars commented Aug 21, 2017

The current PATCH method uses Model class update. This means that sequelize instance hooks aren't fired (eg. afterUpdate). It also means that the postgres schema option is lost.

This checks if the lookup is a singular object, and if so uses the instance.

resolves #155

@skinofstars skinofstars changed the title use model instance in singular patch on postgres WIP use model instance in singular patch on postgres Aug 21, 2017
@skinofstars skinofstars force-pushed the fix/instance-sequelize-hooks-on-singular-patch branch 2 times, most recently from 472494b to 23b66d0 Compare August 22, 2017 09:37
@skinofstars skinofstars force-pushed the fix/instance-sequelize-hooks-on-singular-patch branch from 23b66d0 to 9e4db30 Compare August 22, 2017 09:46
@skinofstars skinofstars changed the title WIP use model instance in singular patch on postgres Use model instance in singular patch on postgres Aug 22, 2017
@skinofstars
Copy link
Author

This add complexity and would probably introduce changes that break others code. Closing.

#155 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PATCH doesn't trigger Sequelize instance hooks
1 participant