-
Notifications
You must be signed in to change notification settings - Fork 242
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
upsert method doesn't trigger any hooks for mysql adapter #461
Comments
Yep, that seems like a missing call, I'd appreciate PR, thank you! |
…reate' method of adapter
Hi, I fixed it by make it work same behavior for all adapter, Thank you |
#461 Call 'find' and then 'update/create' instead call 'updateOrCreat…
Merged. One test is failing, though. I'll try to find some time to investigate why. |
Hi,
I found that the upsert method won't trigger any hook if the adapter support updateOrCreate method (mysql in my case). I debugged and found the reason in below code:
jugglingdb/lib/model.js
Line 336 in 04adcdb
I think it should trigger save/update hooks like other methods,
If you need, i can create a PR for it,
Thank you very much for a nice job!
The text was updated successfully, but these errors were encountered: