Re: EO models referring to different prototypes in the same application
Re: EO models referring to different prototypes in the same application
- Subject: Re: EO models referring to different prototypes in the same application
- From: Paul Hoadley <email@hidden>
- Date: Mon, 14 Jul 2008 23:11:45 +0930
On 14/07/2008, at 10:27 PM, Mike Schrag wrote: I discovered the er.extensions.ERXModelGroup.prototypeModelNames property. So it seems this is _sufficient_ to solve the problem I described:
er.extensions.ERXModelGroup.prototypeModelNames=Prototypes,erprototypes
No, this setting just makes sure these models load first, so it moves them up to the front of the model load order.
I wonder why this solved my original problem then. In my original post I didn't go on to mention that as soon as I tried to use an entity in my model referring to my own Prototypes, the application died with an NPE in PostgresqlExpression.columnTypeStringForAttribute, which was what lead me to suspect the prototypes (and scroll up and read the log output!) in the first place. Was it just that my own Prototypes simply weren't being loaded early enough?
file:/Library/Frameworks/ERPrototypes.framework/Resources/erprototypes.eomodeld) has an entity name conflict with the entities ("EOJDBCPrototypes") already in the model group <EOModelGroup ( ( Prototypes, file:/Users/paulh/Projects/WebObjects/Eclipse/LSWOPrototypes/build/LSWOPrototypes.framework/Resources/Prototypes.eomodeld ) )>
If they both define the same entity name, there is nothing you can do. If you can rename the other entity, I believe ERPrototypes does NOT define "EOPrototypes," so you can rename it to that and at least have access to your other prototype attributes. If there are no attribute name collisions, this MIGHT be enough to make things work.
I can rename the entity in my own Prototypes model. Just to be clear, though, the application is working again. I'm seeing that warning about the duplicate entity names, but it doesn't seem to matter. All models seem to be finding the relevant prototypes despite the duplicate entity names.
(Will renaming my prototypes entity to "EOPrototypes" affect Entity Modeler?)
Thanks for these and your other answers, Mike.
|
_______________________________________________
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