forked from doctrine/mongodb-odm
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding two test cases to BasicDocumentPersisterTest related to the re…
…moval of embedded documents on an update. In the first case, testModifyGroupsArrayDirectly() fetches the groups array from the user, removes two entries, and passes it back. The result is strange for two reasons: 1) The update contains a pullAll() of all three original groups followed by a pushAll() on the one group that remains. This is inefficient, but should work. 2) Even though the above should work, the final result of the test is that all three groups remain. In the second case, testReplaceEntireGroupsArray() replaces the entire groups array with an array the contains one of the three original objects. The subsequent update contains only one pushAll() on the one group. There is no pullAll() to remove the two groups that are no longer on the User.
- Loading branch information
1 parent
524c5ae
commit 9968697
Showing
2 changed files
with
131 additions
and
0 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