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

Ensure nested updates actually updates the child records #51

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dmarcelino
Copy link
Member

Investigating balderdashy/waterline#964 made me realise that nested updates in the form of User.update({id: 1 }, { posts: [ { id: 1, title: 'Test post - updated' }] }) works for 1:1 and 1:m associations but breaks for m:n associations. I'm unsure if this is a waterline core issue or something that needs to be dealt in the adapters or both. But it's something we should look into in order to keep the API consistent between associations types: balderdashy/waterline#965.

This PR ensures nested updates actually updates the child values and this currently breaks on all official adapters (example). The fix for this issue will have to pass this version of the tests.

Tasks:

  • fix m:n nested updates balderdashy/waterline#965

Do not merge until we figure a solution for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant