Closed riley-usagi closed 2 years ago
Hey @riley-usagi , you simply insert both parent and child objects in the managed context (calling insertNewObject
on a concrete NSEntityDescription
) and then assign the references between the objects. Here is an example in this repo, where a Country
has 1-many relationship with NameTranslation
(check out xcdatamodeld
file)
Hi, @nalexn .
Could you please explain how to save (store) related objects (Parent -> Childs) to the database?
Thanks.