Re: Getting all managed objects of given entity
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