NSManagedObject Copy and Paste
NSManagedObject Copy and Paste
- Subject: NSManagedObject Copy and Paste
- From: Mike Burns <email@hidden>
- Date: Sat, 29 Mar 2008 20:52:47 -0400
I have a question regarding implementing copy and paste with
NSManagedObjects--
I've read through the NSPersistentDocument copy and paste tutorial,
but my situation is a bit more involved then just copying and pasting
an employee first and last name. Without getting too involved, this
is the general set up:
The root object that is being copied is called WBCell. WBCell has a
name and some other standard attributes, and then it has a one-to-one
relationship with another managed object (WBScene). The scene object
has some standard attributes and then a one-to-many relationship with
what could potentially be several additional managed objects
(WBGraphicElements), each of which has several standard and non-
standard attributes (bounds, color, etc.).
Is the best way to go about this by creating a dictionary
representation with copy keys (as outlined in the
NSPersistentDocument tutorial) of each of these managed objects, and
then saving an array of dictionaries for each managed object (WBCell,
WBScene and all of the WBGraphicElements) that is going to be
copied? I don't see any other way, but I wanted to make sure before
I began implementing this...
Thanks!
Mike
_______________________________________________
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