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

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -