Re: Copying Managed Objects from App to Doc MOContext
Re: Copying Managed Objects from App to Doc MOContext
- Subject: Re: Copying Managed Objects from App to Doc MOContext
- From: "Kyle Sluder" <email@hidden>
- Date: Sat, 20 Dec 2008 20:55:50 -0500
On Sat, Dec 20, 2008 at 6:58 PM, Jerry Krinock <email@hidden> wrote:
> My app maintains in its managed object context an array of, say, Potato
> objects. The potatoes in this central managed object context come and go
> occasionally -- someone might throw in a new one, or eat one. An archived
> potato is low in calories, consisting of a half dozen numbers or short
> strings.
This doesn't make sense... you don't store arrays in managed object
contexts. There's a set of Potato managed objects in the context,
though. So did you mean that, or are you storing some sort of
ArrayOfPotatoes managed object somewhere?
> My persistent documents can also contain several potatoes. To set one, user
> clicks a popup menu in the document window. The popup is populated by the
> potatoes currently available in the central managed object context.
So, there's a separate app-wide persistent store, or just a separate MOC?
> Looks OK to me, but having never seen anything like this, I was wondering if
> I'm seeing OK today.
It depends on the semantics you're trying to achieve. If what you
really want is to store a reference to the central Potato, then store
its UUID. If you want to store a copy of the potato, keep doing what
you're doing.
--Kyle Sluder
_______________________________________________
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