Re: Multiple EOModels
Re: Multiple EOModels
- Subject: Re: Multiple EOModels
- From: Chuck Hill <email@hidden>
- Date: Thu, 27 Mar 2008 10:52:06 -0700
On Mar 27, 2008, at 1:57 AM, David Griffith wrote:
Hi all,
I have two apps that have two distinct EOModels. I now need to link
these two apps so that they have access to each other's data, so I
was going to add both models to each app and recompile.
Frameworks. You want frameworks. Frameworks are WebObjects (and,
well, OS X's) way of sharing things between applications. Put the
models and the related code in a framework and use the framework in
the application. I _never_ _ever_ put a model in an application.
However, it transpires that both models have a couple of entity
names in common.
Are they the same entity (same database, same table)? If so, create a
framework and model to hold the common entities. Use this framework
in the frameworks holding the models with the other entities. Include
all three frameworks in your application.
If they are not the same entity but just happen to have the same name,
then you need to rename one of them.
I can understand why this would cause a problem, what I need to
know is if there is a way around this without having to completely
rename the entities in one of the models.
The other strange thing is that it tells me there is a name conflict
between the EOPrototypes entity in each model, but I don't think
there is any other way to name this entity, correct?
You probably guessed this already, but "framework". The prototypes go
into a model by themselves and this framework is included in
(referenced in) the frameworks that have models and in the application.
Thus
Application
-> Prototypes framework
-> Common entities framework
-> Other EO framework 1
-> Other EO framework 2
Chuck
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden