From 897b5133828a15a5e506ae475e1793805aa05cfc Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 2 May 2021 13:31:24 -0300 Subject: [PATCH] Fix for Oracle column default value (#35) * Fix for MySql driver class name * Fix for Oracle Column with Default Value * Revert "Fix for MySql driver class name" This reverts commit 66077fcb5a03fb01ae6b11ed6eaba56f2b246b44. Co-authored-by: Humberto Dias --- src/main/java/com/iciql/TableInspector.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/iciql/TableInspector.java b/src/main/java/com/iciql/TableInspector.java index 02bb8ae..207b3c6 100644 --- a/src/main/java/com/iciql/TableInspector.java +++ b/src/main/java/com/iciql/TableInspector.java @@ -163,7 +163,9 @@ public class TableInspector { } } if (!col.isAutoIncrement) { - col.defaultValue = rs.getString("COLUMN_DEF"); + if(rs.getType() != ResultSet.TYPE_FORWARD_ONLY) { + col.defaultValue = rs.getString("COLUMN_DEF"); + } } columns.put(col.name.toLowerCase(), col); } -- 2.39.5