-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
beforeCreate in a through table doesn't seem to work #5289
Comments
I had the same issue: https://github.com/balderdashy/waterline/issues/707 |
@devinivy I don't think the above addresses this issue. It would need to be tested if it happens to be working. I think this would need to setup to run manually though. |
When collections are initialized, junction/through tables go through a particular "migration" process that nixes their lifecycle callbacks. I figured your changes would allow one to not mark the through table as a waterline-created junction table. It is possible that there's more work that would need to be done. The relevant area to look is here: https://github.com/balderdashy/waterline/blob/f8b499ef549f864a813b1eca5bb591f0ec210ac6/lib/waterline.js#L127-L138 . |
Thanks for posting, @GeorgeSapkin. I'm a repo bot-- nice to meet you! It has been 30 days since there have been any updates or new comments on this page. If this issue has been resolved, feel free to disregard the rest of this message. On the other hand, if you are still waiting on a patch, please:
Thanks so much for your help! |
Updated roadmap with this feature |
I'm trying to use Waterline directly to simplify tests, but it seems like
beforeCreate
is not working in through tables. Here's some sample code reproducing the issue:Output:
As you can see
DeviceUser.beforeCreate
is replaced with a default stub and is never triggered.Waterline version 0.10.26
The text was updated successfully, but these errors were encountered: