-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Make m:n nested updates API consistent with 1:1 and 1:m #5531
Comments
I surprised this is a bug, honestly. Could've sworn this worked! What occurs instead of a successful update? Is it possibly updated in the database, but not reflected in the results waterline returns? |
The child values are left untouched but the association between parent and child is set correctly. The tests do a |
We'll wanna look around here: https://github.com/balderdashy/waterline/blob/master/lib/waterline/utils/nestedOperations/update.js#L167-L169 |
@devinivy you are like a travel guide to waterline core code! 😃 |
Thanks for posting, @dmarcelino. 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:
Thanks so much for your help! |
This is the sole blocker for balderdashy/waterline-adapter-tests#51 |
Thanks for posting, @dmarcelino. I'm a repo bot-- nice to meet you! It has been 30 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:
Thanks so much for your help! |
Thanks for posting, @dmarcelino. I'm a repo bot-- nice to meet you! It has been 30 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:
Thanks so much for your help! |
Nested updates in the form of
User.update({id: 1 }, { posts: [ { id: 1, title: 'Test post - updated' }] })
work for 1:1 and 1:m associations but breaks for m:n associations. The API for this should be consistent between association types.PR balderdashy/waterline-adapter-tests#51 provides the failing tests for this feature.
#292 - Add
.add()
,.remove()
,.save()
support for 1-1 and 1-* associations complements this by making the API across 1:1, 1:m and m:n the same for all operations.The text was updated successfully, but these errors were encountered: