When generating JPA Entities from tables with Eclipse (Juno 4.2 for Java EE Developers) it proposes Object
as default mapping type for properties I set to be
Dali (the part of Eclipse that generates JPA entities) uses DTP (another part of Eclipse) to determine the Java attribute type for a particular data type. These mappings are database platform-specific and are specified in .xmi
files in various DTP plug-ins.
For example, in Juno, for PostgreSQL, the data type ABSTIME
is mapped to the Java type java.lang.Object
in the file
/runtime/vendors/postgresql/postgresql_8.x.xmi
in the plug-in jar
./plugins/org.eclipse.datatools.enablement.postgresql.dbdefinition_1.0.2.v201110070445.jar
.
Depending on your database platform and what other plug-ins you have installed, these settings could have changed between Indigo and Juno. You can extract the appropriate .xmi file, edit it, and return it to its jar and this should alter how entities are generated.