Re: Custom attribute class conversion in entity modeler

2009-02-13 Thread Ricardo J. Parada
Thanks Riccardo... Ok... so it looks like your storing the id in the database as a string (with a maximum of 3 characters). At first I thought you were storing it as a number in the database but now that you sent this I realized that id() returns a String and forID() takes a String as an a

Re: Custom attribute class conversion in entity modeler

2009-02-09 Thread Ricardo J. Parada
On Feb 8, 2009, at 6:50 AM, Riccardo De Menna wrote: public static enum Status { ACTIVE(0), DISABLED(1), TRIAL(2), DELETED(-2); private static final Map lookup = new HashMap(); public static Status forID(int id) { return lookup.get(id); } priv

Re: Custom attribute class conversion in entity modeler

2009-02-08 Thread Riccardo De Menna
Yes Mike, It apparently works if I manually replace the $ with a . in the eogenerated classes. Actually it even seems to work with the enum alternative way. After all accessing an enum is basically done the same way so no big surprise I guess. rdm On 08/feb/09, at 15:13, Mike Schrag wro

Re: Custom attribute class conversion in entity modeler

2009-02-08 Thread Mike Schrag
Actually with the $ I get now the EOGenerated template line flagged as error claiming that: Can you manually convert the eogenerated references to dots and see if that all works? If so, I'll make a change to the generator to do this automatically .. ms

Re: Custom attribute class conversion in entity modeler

2009-02-08 Thread Riccardo De Menna
Actually with the $ I get now the EOGenerated template line flagged as error claiming that: "The nested type com.tuorlo.hdm.eo.Client$Status cannot be referenced using it's binary name" The generated accessors look like this one: public com.tuorlo.hdm.eo.Client$Status status() { return

Re: Custom attribute class conversion in entity modeler

2009-02-08 Thread Anjo Krank
Inner classes end up with a '$' instead of a '.' as the class name: com.tuorlo.hdm.eo.Client$Status Cheers, Anjo Am 08.02.2009 um 12:50 schrieb Riccardo De Menna: BTW... I'm having a lot of issues with the custom classes setup. Now for instance I'm trying to use a static inner class and it fa

Re: Custom attribute class conversion in entity modeler

2009-02-08 Thread Riccardo De Menna
BTW... I'm having a lot of issues with the custom classes setup. Now for instance I'm trying to use a static inner class and it fails at runtime. Immagine the following: public static class Status { public final static Status ACTIVE = new Status(0); public final static Status

Re: Custom attribute class conversion in entity modeler

2009-02-06 Thread Mike Schrag
someone else had an issue with a static initializer previously, which is why i was considering this change ... On Feb 6, 2009, at 11:50 AM, Riccardo De Menna wrote: Nevermind, The issue was not caused by the Entity Modeler setting but rather from a static piece of code in the Entity class.

Re: Custom attribute class conversion in entity modeler

2009-02-06 Thread Riccardo De Menna
Nevermind, The issue was not caused by the Entity Modeler setting but rather from a static piece of code in the Entity class. The static code is being executed by entity modeler as soon as the class initializes I guess. This is the static code: static { TEvent.define(1,"SOMETHING N

Re: Custom attribute class conversion in entity modeler

2009-02-06 Thread Mike Schrag
And my com.tuorlo.user.TEvent class has these two methods: Does this class actually exist in your project? And is it in the classpath? Entity Modeler constructs its classpath based on you project's classpath definition. ms ___ Do not post admin

Re: Custom attribute class conversion in entity modeler

2009-02-06 Thread Riccardo De Menna
Is it possible? Am I doing anything wrong? On 05/feb/09, at 15:52, Mike Schrag wrote: But as soon as I push the generate SQL button in the entity modeler window I get an error window from wolips with the following exception: java.lang.NoClassDefFoundError I've been thinking that maybe I sh

Re: Custom attribute class conversion in entity modeler

2009-02-05 Thread Mike Schrag
But as soon as I push the generate SQL button in the entity modeler window I get an error window from wolips with the following exception: java.lang.NoClassDefFoundError I've been thinking that maybe I should turn all entities into EOGenericRecord going into SQL generation ... I haven't thoug