Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
EclipseLink/Examples/JPA/Migration/OpenJPA/ColumnTypes
< EclipseLink | Examples | JPA | Migration | OpenJPA
Revision as of 12:50, 6 November 2014 by Unnamed Poltroon (Talk) (Created page with "== Differences between OpenJPA and EclipseLink: Basic Column Types == The columns added in the database tables created for each entity differ between OpenJPA and EclipseLink...")
Differences between OpenJPA and EclipseLink: Basic Column Types
The columns added in the database tables created for each entity differ between OpenJPA and EclipseLink. When migrating from OpenJPA to EclipseLink, if a user wants to use existing tables created by OpenJPA, most of these differences will not be problematic since EclipseLink adapts to the existing column types when persisting new entities. The following table lists the field types that are created as a different column type in OpenJPA and EclipseLink.
Java Type | OpenJPA | EclipseLink |
---|---|---|
java.io.Serializable java.lang.Byte[], byte[] java.lang.Class java.lang.String[] |
BLOB(1048576) | BLOB(64000) |
java.lang.Boolean, boolean | SMALLINT | SMALLINT WITH DEFAULT 0 |
java.lang.Character | CHAR(254) | CHAR(1) |
java.lang.Character[], char[] | VARCHAR(254) | CLOB(64000) LOGGED NOT COMPACT |
java.lang.Float, float | REAL | DOUBLE |
java.lang.String | VARCHAR(254) | VARCHAR(255) |
java.math.BigDecimal | DOUBLE | DECIMAL(15,0) |
enum | SMALLINT | INTEGER |