From 8292f968ed1303dffe7287db408f64597609fd48 Mon Sep 17 00:00:00 2001 From: ajaypaul-ibm <135797583+ajaypaul-ibm@users.noreply.github.com> Date: Mon, 11 Nov 2024 19:27:28 +0530 Subject: [PATCH] Fixes : Db2: Eclipselink creates table with Db2 data type DOUBLE instead of REAL for a Java float (#2296) --- .../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));