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

Potential PR for lifecycle callbacks on junction tables (used with through-associations) #5287

Closed
devinivy opened this issue Oct 29, 2014 · 2 comments
Assignees

Comments

@devinivy
Copy link

I'm using through associations in waterline, and it seems to be working alright after some hacking, but I can't use lifecycle callbacks. I'd very much like to! The issue is that junction tables are re-loaded as collections. So, my lifecycle callbacks register the first time and are overwritten the second time. See here: https://github.com/balderdashy/waterline/blob/f8b499ef549f864a813b1eca5bb591f0ec210ac6/lib/waterline.js#L127-L138

If I issue a pull request with relevant tests, would you consider accepting this mini-"feature"? I would approach this problem by specifically disallowing junction tables to overwrite existing collections. I would key them on collection identity.

@HaNdTriX
Copy link

+1

@sailsbot
Copy link

Thanks for posting, @devinivy. I'm a repo bot-- nice to meet you!

It has been 60 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:

  • review our contribution guide to make sure this submission meets our criteria (only verified bugs with documented features, please; no questions, commentary, or bug reports about undocumented features or unofficial plugins)
  • create a new issue with the latest information, including updated version details with error messages, failing tests, and a link back to the original issue. This allows GitHub to automatically create a back-reference for future visitors arriving from search engines.

Thanks so much for your help!

@raqem raqem transferred this issue from balderdashy/waterline May 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants