You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For an entity with Java float attributes, using jakarta.persistence.schema-generation.database.action results in columns being created as Double (64-bit precision) instead of Real (32-bit precision). This is due to Eclipselink attempting to create the column as Float instead of Real: CREATE TABLE Packages (ID INTEGER NOT NULL, DESCRIPTION VARCHAR(255), HEIGHT FLOAT, LENGTH FLOAT, WIDTH FLOAT, PRIMARY KEY (ID))
This results in the following:
Data type Column
Column name schema Data type name Length Scale Nulls
------------------------------- --------- ------------------- ---------- ----- ------
ID SYSIBM INTEGER 4 0 No
DESCRIPTION SYSIBM VARCHAR 255 0 Yes
HEIGHT SYSIBM DOUBLE 8 0 Yes
LENGTH SYSIBM DOUBLE 8 0 Yes
WIDTH SYSIBM DOUBLE 8 0 Yes
The end result of this is the first time an entity is persisted on a db2 connection, the float values can be slightly off due to the precision change from 32 bit to 64 bit. This can result in incorrect sorting like this issue: #2194
The text was updated successfully, but these errors were encountered:
For an entity with Java float attributes, using
jakarta.persistence.schema-generation.database.action
results in columns being created asDouble
(64-bit precision) instead ofReal
(32-bit precision). This is due to Eclipselink attempting to create the column asFloat
instead ofReal
:CREATE TABLE Packages (ID INTEGER NOT NULL, DESCRIPTION VARCHAR(255), HEIGHT FLOAT, LENGTH FLOAT, WIDTH FLOAT, PRIMARY KEY (ID))
This results in the following:
persistence.xml
Package.java
The end result of this is the first time an entity is persisted on a db2 connection, the float values can be slightly off due to the precision change from 32 bit to 64 bit. This can result in incorrect sorting like this issue: #2194
The text was updated successfully, but these errors were encountered: