cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject [1/2] cayenne git commit: CAY-2297 Can't edit DbAttributePath after inheritance remove
Date Fri, 05 May 2017 11:57:24 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master d65baae37 -> 0ce74ab79


CAY-2297 Can't edit DbAttributePath after inheritance remove


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/45ac1993
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/45ac1993
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/45ac1993

Branch: refs/heads/master
Commit: 45ac1993f66e8ae413d23fc20fb76f84dfcad3fa
Parents: a2e0452
Author: Anton Dreka <drekoas@gmail.com>
Authored: Thu May 4 16:49:23 2017 +0300
Committer: Anton Dreka <drekoas@gmail.com>
Committed: Thu May 4 16:49:23 2017 +0300

----------------------------------------------------------------------
 .../org/apache/cayenne/modeler/editor/ObjEntityTab.java     | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/45ac1993/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityTab.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityTab.java
b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityTab.java
index 38cabb9..e9bc159 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityTab.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityTab.java
@@ -296,6 +296,15 @@ public class ObjEntityTab extends JPanel implements ObjEntityDisplayListener,
 
                     }
                     entity.setSuperEntityName(name);
+
+                    // drop not valid dbAttributePath
+                    if (name == null) {
+                        for (ObjAttribute objAttribute : entity.getAttributes()) {
+                            if (objAttribute.getDbAttribute() == null) {
+                                objAttribute.setDbAttributePath(null);
+                            }
+                        }
+                    }
                     
                     if (name == null) {
                         dbEntityCombo.setEnabled(true);


Mime
View raw message