'Spring Mongo DocumentReference
Switching to MongoDB from Postgres, the question arose of how best to organize the relationship between collections.
Does this annotation @DocumentReference support cascade delete and save... Or is it necessary to first save the ChildDocument and then save the ParentDocument?
Solution 1:[1]
You must save the child and then save the parent;
An example on the link: here; look at title: Linking using Declarative Manual References
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Lion Tev |