• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
CoreData Predicate Question - Retriving child objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: My app breaks when moved while running
  • Next by Date: Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful
  • Previous by thread: NSCollectionView and double-clicks
  • Next by thread: Re: CoreData Predicate Question - Retriving child objects
  • Index(es):
    • Date
    • Thread