From 361a77c4512821081185300504fa88b304cfbdbd Mon Sep 17 00:00:00 2001 From: "A. Abram White" Date: Wed, 4 Oct 2006 21:16:06 +0000 Subject: [PATCH] Fix bug that could prevent user-assigned value from being inserted into a column with a database default value. git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@453030 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/openjpa/jdbc/sql/RowImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/RowImpl.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/RowImpl.java index cf50e4c9a..38180c595 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/RowImpl.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/RowImpl.java @@ -666,7 +666,8 @@ public class RowImpl if (_action == ACTION_INSERT) { if (col.isAutoAssigned()) return; - if (!overrideDefault && col.getDefaultString() != null) + if (!overrideDefault && val == null + && col.getDefaultString() != null) return; } if (val == null && col.isNotNull())