> On 2 Jun 2016, at 21:18, Chuck Hill <[email protected]> wrote:
> 
> finishInitialization() in your application. 

I have attempted to tweak my ‘User’ entity at 
‘Application.finishInitialization()’,
But when the app tries to get a User object, it blows up:

ERROR er.extensions.eof.ERXEntityClassDescription  - Unable to register 
descriptions for class: class com.es.eo.User
RuntimeException: Dummy
  at 
er.extensions.eof.ERXEntityClassDescription$Factory.registerDescriptionForClass(ERXEntityClassDescription.java:615)
  at 
er.extensions.eof.ERXEntityClassDescription$Factory.classDescriptionNeededForClass(ERXEntityClassDescription.java:392)

The smallest change that causes the error above is:
---
EOEditingContext tmpEc = ERXEC.newEditingContext();
EOEntity entity = EOUtilities.entityNamed(tmpEc, "User");
entity.setClassName("com.es.eo.User"); // changed from 'com.mg.users.eo.User'
---

I guess I need to re-initialise or register something, but I am not sure what 
exactly.

Thanks, 

Mark

>  
> Chuck
>  
>  
> From: <[email protected]> on behalf 
> of Mark Gowdy <[email protected]>
> Date: Thursday, June 2, 2016 at 1:14 PM
> To: WebObjects-Dev <[email protected]>
> Subject: Tweaking the model on start-up
>  
> Hi,  
>  
> Is there a convenient way to update an Entity details when the app starts up?
>  
> e.g.
> 'Model Framework’ (A) has an Entity called ‘User’
> ‘Model Framework’ (B) has an Entity called ‘Hub’ that is joined (to-one) with 
> to ‘User’
> i.e.
> com.B.Hub   —> com.A.User
> (where ‘User’ knows nothing about ‘Hub’, it is out of scope)
>  
> I can create a class in (B) called 
> com.B.User extends com.A.User
>  
> so that I can add the additional set/get code, 
>  
> and then apply something like this (at start-up):
> {
> className = "com.B.User";
> relationships = (
> {
> destination = Hub; 
> isToMany = Y; 
> joinSemantic = EOInnerJoin; 
> joins = ({destinationAttribute = userID; sourceAttribute = id; }); 
> name = hubs; 
> }
> );
> }
>  
> Any suggestions?
>  
> Mark
>  
> _________________
> Mark Gowdy
> Gowdy Associates Ltd
> Skype: markgowdy
> 
> 
> 
>  

_________________
Mark Gowdy
Gowdy Associates Ltd
M: +44 7808 400 941
Skype: markgowdy




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to