summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/data/util
diff options
context:
space:
mode:
authorJonatan Kronqvist <jonatan.kronqvist@itmill.com>2011-09-08 10:14:31 +0000
committerJonatan Kronqvist <jonatan.kronqvist@itmill.com>2011-09-08 10:14:31 +0000
commit8c104cd1c5db142097a99dbef0e7b43a8663e5c2 (patch)
tree642474f89fa4adf259c784b7fe89d52c8b5e2c6b /src/com/vaadin/data/util
parentf80720108b9502fce75bce0b66c7ae6b8efd44b9 (diff)
downloadvaadin-framework-8c104cd1c5db142097a99dbef0e7b43a8663e5c2.tar.gz
vaadin-framework-8c104cd1c5db142097a99dbef0e7b43a8663e5c2.zip
Fix for #7434
svn changeset:20923/svn branch:6.7
Diffstat (limited to 'src/com/vaadin/data/util')
-rw-r--r--src/com/vaadin/data/util/sqlcontainer/ColumnProperty.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/com/vaadin/data/util/sqlcontainer/ColumnProperty.java b/src/com/vaadin/data/util/sqlcontainer/ColumnProperty.java
index 60e81f2e44..db935e0124 100644
--- a/src/com/vaadin/data/util/sqlcontainer/ColumnProperty.java
+++ b/src/com/vaadin/data/util/sqlcontainer/ColumnProperty.java
@@ -128,7 +128,7 @@ final public class ColumnProperty implements Property {
* If the value to be set is the same that has already been set, do
* not set it again.
*/
- if (newValue.equals(value)) {
+ if (isValueAlreadySet(newValue)) {
return;
}
}
@@ -139,6 +139,15 @@ final public class ColumnProperty implements Property {
modified = true;
}
+ private boolean isValueAlreadySet(Object newValue) {
+ if (isModified()) {
+ return (isNullable() && newValue == null && changedValue == null)
+ || newValue.equals(changedValue);
+ }
+ return (isNullable() && newValue == null && value == null)
+ || newValue.equals(value);
+ }
+
public Class<?> getType() {
return type;
}