recursion - NSFetchRequest with sort descriptors for recursive CoreData Entity relationship -
i have got simple coredata entity "myentity" recursive relationship:
(the relation one-to-one relation in case)
imagine had created 5 objects of entity:
objecta -> objectb -> objectc -> objectd -> objecte
(objectb
child of objecta
, on)
i create nsfetchrequest nssortdescriptors return objects in correct order (from root last child):
objecta objectb objectc objectd objecte
is possible? (my specific problem more complex, think can done if got simple 1 solved)
why bother, fetch parent object , it's child , child's child property (relationship) directly. if need them in array use while loop traverse hierarchy until child = nil.
Comments
Post a Comment