NSPersistentDocument - where is setManagedObjectModel
NSPersistentDocument - where is setManagedObjectModel
- Subject: NSPersistentDocument - where is setManagedObjectModel
- From: Ken Victor <email@hidden>
- Date: Sat, 24 Sep 2005 17:51:07 -0700
before going much further in my core data document app, i want to
implement the hooks and stub procedures to support versioning of my
core data model. this means that there will be more than one model
(.mom) file in the resources folder of my app package. thus, i don't
want the default behavior of merging models found in my bundle (app
package). and while i understand how to create a NSManagedObjectModel
via:
[[[NSManagedObjectModel alloc] initWithContentsOfURL: momURL]
autorelease];
i am a little confused about something. clearly, i don't want to
return a newly created NSManagedObjectModel everytime my doc's
override of managedObjectModel is called (as is implied by the
snippet for the api documentation of NSPersistentDocument
managedObjectModel). however, i don't see how to check if i have
already created a NSManagedObjectModel for my document, ie, i can't
access the private ivar _managedObjectModel to see if it is nil, nor
can i set this as there doesn't appear to be a setManagedObjectModel
method anyplace.
now, clearly i can handle this by having my own ivar to hold the
NSManagedObjectModel i create.
i'm just wondering if i'm missing something obvious?
thanx,
ken
_______________________________________________
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