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: Charilaos Skiadas <email@hidden>
- Date: Sat, 9 Jul 2005 10:30:45 -0500
On Jul 9, 2005, at 3:42 AM, Chris Hanson wrote:
On Jul 8, 2005, at 10:01 PM, Charilaos Skiadas wrote:
Yeah, I was about to do that, but I'll opt for talking to the
controllers that I already have doing the work for me. It would
just mean my document class would need to connect to them. Oh well.
Why can't your document just issue a fetch request? It's very
simple, only a couple lines of code.
It can, no reason for it not to really.
I guess my question is what is the reason for the absence of the
method? Was it deemed not useful? Or is it in some sense
recommended to go through the controllers?
There's already a simple way in Core Data to do this, by issuing a
fetch request for the entity without specifying a predicate. The
advantage of issuing the request is that errors will be reported
and you can control how the results you receive are sorted.
Ah, that is true, didn't think of the errors. In my case I actually
don't care about the sorting. All I want is to create a new object of
another entity, for each object of this entity.
-- Chris
Haris
_______________________________________________
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