mirror of https://github.com/apache/openjpa.git
OPENJPA-2335: Set non-default value to a foreign key contrained column
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1447906 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
05b41094b8
commit
7ce7e55620
|
@ -338,9 +338,9 @@ public class PrimaryRow
|
|||
if (prev == NULL)
|
||||
prev = null;
|
||||
if (!rowValueEquals(prev, val)) {
|
||||
if (allowsUpdate(col, prev, val)) {
|
||||
if (isDefaultValue(prev) || allowsUpdate(col, prev, val)) {
|
||||
super.setObject(col, val, metaType, overrideDefault);
|
||||
} else if (!isDefaultValue(val)) {
|
||||
} else if (!isDefaultValue(prev)) {
|
||||
throw new InvalidStateException(_loc.get("diff-values",
|
||||
new Object[]{ col.getFullDBIdentifier().getName(),
|
||||
(prev == null) ? null : prev.getClass(), prev,
|
||||
|
|
Loading…
Reference in New Issue