-
Type: Improvement
-
Resolution: Fixed
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
2 - S (<= 1 week)
-
2408
-
Needed
Goals
When migrating to EmbeddedObject two cases have to be handled:
- Objects without backlinks (orphaned objects)
- Objects with more than one backlink
This is necessary due to the nature of {{EmbeddedObject}}s always belonging to one and only one other object.
As explained in https://github.com/realm/realm-dotnet/issues/2394 and https://github.com/realm/realm-dotnet/discussions/2393 this cannot be achieved while migrating because EmbeddedObject cannot be iterated over / queried since it's not a standalone object.
This will also unlock https://github.com/realm/realm-dotnet/issues/2394.
Expected Results
- Orphaned objects get deleted automatically when a flag for deleting them is set as part of the migration block.
- Objects with multiple backlinks will be duplicated so that every object linking to them gets their own version.