[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] [EclipseLink-7155] ValidationException

Sorry if I was not clear : only the Oracle schema can not change (legacy database).But I certainly could change the generated class and replace Âeach java.lang.Object Âfields with a java.math.BigDecimal.

But in that case, Âmy changes would then be lost each time I would regenerate my entities, wouldn't they ?Â

The reason I have several regenerations (from db tables to entities) is because the database model is large, and I'd like to use the JPA Tools wizard to gradually implement some (not all) Âentitiy relationships.

Would there be a way to not lose the field type change (from Object to BigDecimal) while still let the JPA Tools wizard help me implement the entites relationships ?

Or is this mandatory to generate all entities with their entire relationships with a single use of the JPA Tools wizard ?

ÂThanks again .

Eric Le Goff

On Fri, Apr 27, 2012 at 5:19 PM, Tom Ware <tom.ware@xxxxxxxxxx> wrote:
Is there any reason you can't change the generated class?


On 27/04/2012 11:15 AM, Eric Le Goff wrote:
I am starting to use eclipseLink (v2.3.2) against an Oracle database in tomcat
web application.

One of my entity has to map a legacy table which contains columns of type
(These columns actually hold currency amounts)

When using menu JPA Tools -> Generate entities from Table...
this entity is generated and the correspoing fields have java.lang.Object type.

While loading a Tomcat context, I get a ValidationException [EclipseLink-7155]
claiming that the type [class java.lnag.Object] for the attribute [mycolumn] on
the entity class [com.acme.Foo] is not a valid type for a serialized mapping.
The attribute type must implement Serializable.

Would there be a way to have the generated field to have type like
java.math,BigDecimal instead of java.lang.Object ?

Any suggestion would help, but I bear in mind that I can't change the original
Oracle BINARY_DOUBLE type into some other more convenient type.

Thanks for your help


Eric Le Goff

eclipselink-users mailing list
eclipselink-users mailing list