Re: Creating a managed object without adding it to the context?
Re: Creating a managed object without adding it to the context?
- Subject: Re: Creating a managed object without adding it to the context?
- From: Jerry Krinock <email@hidden>
- Date: Sat, 24 Jan 2009 14:51:23 -0800
On 2009 Jan 24, at 14:13, Ulai Beekam wrote:
How do I programmatically create a managed object (with respect to
some entity in a particular context of course) but WITHOUT adding it
to the context?
I do not believe this is possible. A managed object without a context
would not be "managed".
The reason I want this is to be able to take that new managed object
and add it via an NSArrayController (one that is connected to said
context of course) instead. That way I will get all the benefits of
the array controller, such as the newly inserted object getting
selected in a table view that is bound to the array controller.
You indicated in your first sentence that you know which managed
object context the new object is destined for. I don't see the
problem. Just insert it when you create it.
_______________________________________________
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