-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add support for one-one mutation from sec. side (#1247)
* Remove commented out code * Remove commented out code * Fix IsPrimaryRelation Was inverted, and returned false for primary relations and true for secondaries. * Remove doc.Clean from loop There is no point doing this for each field, and it risks bugs by calling it so late within the loop where it may be skipped over by 'continue' controls * Expand right-side create test to query both directions Should make sure both work. * Add test for update mutation from primary side * Add support for update from sec. side Note: This does not affect the collection.Update function, as that goes via `c.save`, and not `c.applyPatch`. That behaviour will be changed with either mutation-create, or a different ticket for those calls. It might be nice to investigate unifying these at somepoint, but not now. The two new functions isSecondaryIDField and patchPrimaryDoc will be used as-is when adding support for wrong-side save calls. They are broken into two functions due to the differences in `c.save` and `c.applyPatch`. It may be worth reviewing these two functions within the context of both commits. * Add support for c.save-mutations from sec. side This includes support for request create mutations, and collection.Save calls.
- Loading branch information
1 parent
2e73dc0
commit 680b65a
Showing
7 changed files
with
416 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.