• 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: EO models referring to different prototypes in the same application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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 21:09:19 +0930

On 14/07/2008, at 7:17 PM, Paul Hoadley wrote:

Assume that I _can't_ re-write the old models against ERPrototypes (I probably could, but that's a bridge I'd rather cross later).  Is it possible to (perhaps programmatically) declare prototypes model-by-model?  That is, can I tell EOF to use ERPrototypes for the model in the Wonder application, and my own prototypes for the models in the older, non-Wonder framework?

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

I still see basically the same error logged (though now the models are loading in the order specified above, so in reverse to my first attempt):

Jul 14 20:57:47 RM[54321] (ERXModelGroup.java:109) WARN  er.extensions.ERXModelGroup  - Clearing previous class descriptions
Jul 14 20:57:48 RM[54321] (ERXModelGroup.java:778) WARN  er.extensions.ERXModelGroup  - The EOModel 'Prototypes' does not have a connection dictionary, providing an empty one
Jul 14 20:57:48 RM[54321] (ERXEntityClassDescription.java:564) WARN  er.extensions.ERXEntityClassDescription  - Invalid class name for entity: EOJDBCPrototypes exception: java.lang.ClassNotFoundException: EOJDBCPrototypes using com.webobjects.eocontrol.EOGenericRecord instead
Jul 14 20:57:48 RM[54321] (ERXModelGroup.java:228) WARN  er.extensions.ERXModelGroup  - The model 'erprototypes' (path: 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 ) )>

I'm not sure precisely what's going on, though.  Does ERXModelGroup merge the attributes in the two entities and use them all as prototypes now?  What if there were attribute name collisions?  Is having multiple prototype entities an acceptable approach, and if so, is this the canonical way to do it (in Wonder)?  (Finally, if anyone is still reading, is this possible without Wonder?)


-- 
Paul.

w  http://logicsquad.net/
h  http://paul.hoadley.name/


 _______________________________________________
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

  • Follow-Ups:
    • Re: EO models referring to different prototypes in the same application
      • From: Mike Schrag <email@hidden>
References: 
 >EO models referring to different prototypes in the same application (From: Paul Hoadley <email@hidden>)

  • Prev by Date: EO models referring to different prototypes in the same application
  • Next by Date: Re: EO models referring to different prototypes in the same application
  • Previous by thread: EO models referring to different prototypes in the same application
  • Next by thread: Re: EO models referring to different prototypes in the same application
  • Index(es):
    • Date
    • Thread