Re: CoreData, inheritance and plug-ins
Re: CoreData, inheritance and plug-ins
- Subject: Re: CoreData, inheritance and plug-ins
- From: Jim Correia <email@hidden>
- Date: Thu, 10 Nov 2005 17:29:57 -0500
On Nov 10, 2005, at 3:47 PM, Bill Dozier wrote:
I would like for my CoreData application to be extensible via plug-
ins. One of the things the plug-ins would do is to extend by
inheritance the abstract entities in my data model. I'm planning to
call:
+ (NSManagedObjectModel *)modelByMergingModels:(NSArray *)models
after loading each plug-in. Is this the preferred method?
I think you'll find that this isn't going to work. The shape of the
store depends on the entities/attributes/relationships in the data
model. If plug-ins are allowed to define entities (otherwise why else
would you be doing this), consider the following scenario:
Application + Plug-in 1 + Plug-in 2:
We'll call this aggregate model version 1. User creates a document 1
and saves.
User buys/downloads Plug-in 3, installs it.
We'll call this aggregate model version 2. User creates document 2
and saves it.
Document 1 is now in an incompatible format, and one which you can't
readily migrate yourself because you really don't have intimate
knowledge of all the parts of aggregate model version 1 (or 2.)
Jim
_______________________________________________
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