tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r1539977 - /tomee/tomee/branches/tomee-1.6.0/deps/openjpa/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PrimaryRow.java
Date Fri, 08 Nov 2013 11:03:44 GMT
Author: dblevins
Date: Fri Nov  8 11:03:44 2013
New Revision: 1539977

URL: http://svn.apache.org/r1539977
Log:
Reverting OPENJPA-2335: Set non-default value to a foreign key contrained column

Modified:
    tomee/tomee/branches/tomee-1.6.0/deps/openjpa/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PrimaryRow.java

Modified: tomee/tomee/branches/tomee-1.6.0/deps/openjpa/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PrimaryRow.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.6.0/deps/openjpa/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PrimaryRow.java?rev=1539977&r1=1539976&r2=1539977&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.6.0/deps/openjpa/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PrimaryRow.java
(original)
+++ tomee/tomee/branches/tomee-1.6.0/deps/openjpa/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PrimaryRow.java
Fri Nov  8 11:03:44 2013
@@ -338,9 +338,9 @@ public class PrimaryRow
             if (prev == NULL)
                 prev = null;
             if (!rowValueEquals(prev, val)) {
-            	if (isDefaultValue(prev) || allowsUpdate(col, prev, val)) {
+            	if (allowsUpdate(col, prev, val)) {
             		super.setObject(col, val, metaType, overrideDefault);
-            	} else if (!isDefaultValue(prev)) {
+            	} else if (!isDefaultValue(val)) {
             		throw new InvalidStateException(_loc.get("diff-values",
             				new Object[]{ col.getFullDBIdentifier().getName(),
                             (prev == null) ? null : prev.getClass(), prev,



Mime
View raw message