feathers-sequelize icon indicating copy to clipboard operation
feathers-sequelize copied to clipboard

Hook to manage relationships

Open daffl opened this issue 7 years ago • 0 comments

Follow up from https://github.com/feathersjs-ecosystem/feathers-sequelize/issues/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

daffl avatar Nov 21 '18 20:11 daffl