Skip to content

Ensure nested updates actually updates the child records#51

Open
dmarcelino wants to merge 2 commits intomasterfrom
update_nested
Open

Ensure nested updates actually updates the child records#51
dmarcelino wants to merge 2 commits intomasterfrom
update_nested

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