Skip to main content

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

Neil,

I finally chose your option which is indeed a perfect solution for saving the mapping field configuration for subsequent generations. Thanks very much for that tip !

Would there also be some place in the wizard to save the configuation of Named Queries on entities ?

So far my entities generations are almost fine except that block definition of Named queries are not re-generated

@Entity
@NamedQueries({
  @NamedQuery(name = "myquery1, query=.....
  @NamedQuery(name = "myquery2, query=.....
})

Thanks again
--
Eric 




On Fri, Apr 27, 2012 at 5:58 PM, Neil Hauge <neil.hauge@xxxxxxxxxx> wrote:
Eric,

Another option is to configure the "Mapping type" for this particular column/attribute on the final page of the entity generation wizard.  If you go to the column in question in the Tables and columns tree, you can configure the java type that is used for this particular attribute.  This configuration will be saved and will be used on subsequent generation runs.  It doesn't change the column type to java type mapping for all columns, but rather changes it for the specific attribute you are configuring.

Hope this helps.

Neil


On 4/27/2012 11:19 AM, Tom Ware 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
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top