Closed tifroz closed 7 years ago
I think the warning is sufficient because (unless we get lucky and objects end up being inserted in the right order), core data will throw a little bit later: "can't insert because a depends on b which is missing".
Bottom line, you will get a sensible pair of warning + error
Sent from my iPhone
On Oct 3, 2017, at 2:33 PM, Paul Wilkinson notifications@github.com wrote:
@paulw11 commented on this pull request.
Is the warning log sufficient in the case of a detected loop? ie. Will issuing the warning and continuing still deliver a correct result, or should the function throw at that point?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Adds support for object graph insertion (where some objects are dependant on other objects - aka non-optional relationships). It would be very useful when migrating from a legacy store, because that's when a large number of objects get dumped - and if you have non-optional relationships in your object graph, you'd be in trouble
Another way to describe this PR, it avoid errors like
Can't insert A if B isn't already present (object A has a a dependency on object B via a non-optional relationship).
Limitations Objects graphs with loops in the dependency chains (in particular, self-referencing objects) are not supported.