CoreData Predicate Question - Retriving child objects
CoreData Predicate Question - Retriving child objects
- Subject: CoreData Predicate Question - Retriving child objects
- From: Chris Schmitt <email@hidden>
- Date: Thu, 7 Feb 2008 23:55:44 -0500
I have a data structure setup in a tree format that is displayed in an
outline view...
Example:
A
B
C
D
E
I have an outline view hooked up to a NSTreeController, through
bindings and my outline view is working fine. My question is
regarding the children for each of the objects. When the user clicks
on one of the records, for instance "B".. I display all the child
objects for that entity.
How do I recursively pull back all the children for an entity? For
instance if I click on "A" how do I get a list of the detail records
for "B,C and D"?
My gut tells me I need to write a custom recursive function to get all
the detail records for an entity and then add those into the content
set? But I would think that would be an expensive operation to create
a fetch request for each child.
Thanks In Advance.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden