• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Multiple EOModels
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple EOModels


  • Subject: Re: Multiple EOModels
  • From: David Griffith <email@hidden>
  • Date: Wed, 2 Apr 2008 10:00:43 +0200

Thanks for that, obviously frameworks are the way to go, I haven't really needed to make my own up to now but clearly I should have :-) Back to the bookshelf then :-)

Regards,
David.

On 27 Mar 2008, at 18:52, Chuck Hill wrote:


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
  • Prev by Date: Re: WO 5.4 Linux Deployment
  • Next by Date: D2WS: Can't obtain rules because of protected access!
  • Previous by thread: Re: WO 5.4 Linux Deployment
  • Next by thread: Adaptor problems in Eclipse. No Instance Available
  • Index(es):
    • Date
    • Thread