Skip to main content

[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
http://fr.linkedin.com/in/elegoff





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?

-Tom


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
BINARY_DOUBLE
(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

Cheers




--
Eric Le Goff




_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top