Re: CoreData, inheritance and plug-ins
Re: CoreData, inheritance and plug-ins
- Subject: Re: CoreData, inheritance and plug-ins
- From: Miguel Sanchez <email@hidden>
- Date: Thu, 8 Dec 2005 17:17:45 -0800
Strange, the calling setSubentities should only modify the structure
of the model before it's actually used to load data. Yet you say that
you get an infinite recursion while creating the DB, which would be
another step. Are you still having this problem? If so, could you
please file a bug or send a sample backtrace.
And sorry, we don't have an example for this, but modifying the
model in code should work as long as the result is a logical and
correct model.
- Miguel
On Dec 1, 2005, at 6:54 PM, Dave Hayden wrote:
On Nov 10, 2005, at 3:55 PM, Miguel Sanchez wrote:
two things:
+ the original post might have been asking if the
modelByMergingModels would automatically do the parent-child
hookup of the entities. If this was the question, the answer is
no. You won't be able to declare the parent of a class within the
modeling tool if that parent isn't in the same model you're
editing. You'll have to figure out a way of encoding this parent
dependency, either by creating a dummy parent class that get
swiped for the real one, or putting the name of the parent in the
user info of the entity. In any case, you'll need to have code
that tweaks your child model by
- calling modelByMergingModels
- and then setting the parent-child relationships in the
resulting model
Hey there, just a late reply to this as I'm digging through the
archives. Setting parents across models with -[NSEntityDescription
setSubentities:] doesn't seem to work for me at all with a SQLite
store--it goes into an endless recursion trying to create the
database.
Is there example code anywhere that shows this working?
Thanks,
-Dave
Panic, Inc.
_______________________________________________
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