recursion - NSFetchRequest with sort descriptors for recursive CoreData Entity relationship -


i have got simple coredata entity "myentity" recursive relationship: myentity definition

(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

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -