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

Hook to manage relationships #250

Open
daffl opened this issue Nov 21, 2018 · 0 comments
Open

Hook to manage relationships #250

daffl opened this issue Nov 21, 2018 · 0 comments

Comments

@daffl
Copy link
Member

daffl commented Nov 21, 2018

Follow up from #211. Managing relationships with Sequelize is quite strange. For example it doesn't allow updating nested entries and creating nested relationship does not include them in the result (you have to re-fetch). There is an opportunity to add hooks that can help with that:

  • Go through each associated entry
  • Check if it has an id
    • If it does check if it has the association
    • If not, add it
  • If it doesn't, leave it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant