• 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
Re: Getting all managed objects of given entity
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting all managed objects of given entity


  • Subject: Re: Getting all managed objects of given entity
  • From: mmalcolm crawford <email@hidden>
  • Date: Fri, 8 Jul 2005 21:54:16 -0700


On Jul 8, 2005, at 9:45 PM, Charilaos Skiadas wrote:

Do I understand correctly, that if I want to get hold of all the managed objects corresponding to a particular entity, I would need to use a fetch request?

Yes (unless you're using an array controller -- see below).

I.e. there is no method of NSEntityDescription that would do it for me automatically?

No.  It would be trivial enough to write a category method  :-)

+ objectsForEntityForName:inManagedObjectContext:


How does NSArrayController achieve the same thing?

It uses a fetch request. If you select "Automatically prepares content" then the controller also registers as an observer of its managed object context and responds to insertions and deletions as appropriate.

mmalc

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Getting all managed objects of given entity
      • From: Charilaos Skiadas <email@hidden>
References: 
 >Getting all managed objects of given entity (From: Charilaos Skiadas <email@hidden>)

  • Prev by Date: Newbie: performSelector: withObject: afterDelay: inModes: question..
  • Next by Date: Re: Getting all managed objects of given entity
  • Previous by thread: Getting all managed objects of given entity
  • Next by thread: Re: Getting all managed objects of given entity
  • Index(es):
    • Date
    • Thread