From 12b88940d201e0cf8d9122580ef58d13c8d4b66b Mon Sep 17 00:00:00 2001 From: Ajay Paul Date: Fri, 8 Nov 2024 11:42:34 +0530 Subject: [PATCH] Fixes : Db2: Eclipselink creates table with Db2 data type DOUBLE instead of REAL for a Java float --- .../org/eclipse/persistence/platform/database/DB2Platform.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/DB2Platform.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/DB2Platform.java index 8b61aa927f6..1899d268087 100644 --- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/DB2Platform.java +++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/platform/database/DB2Platform.java @@ -311,7 +311,7 @@ protected Hashtable, FieldTypeDefinition> buildFieldTypes() { fieldTypeMapping.put(Integer.class, new FieldTypeDefinition("INTEGER", false)); fieldTypeMapping.put(Long.class, new FieldTypeDefinition("BIGINT", false)); - fieldTypeMapping.put(Float.class, new FieldTypeDefinition("FLOAT", false)); + fieldTypeMapping.put(Float.class, new FieldTypeDefinition("REAL", false)); fieldTypeMapping.put(Double.class, new FieldTypeDefinition("FLOAT", false)); fieldTypeMapping.put(Short.class, new FieldTypeDefinition("SMALLINT", false)); fieldTypeMapping.put(Byte.class, new FieldTypeDefinition("SMALLINT", false));