cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1417052 - in /cayenne/main/branches/STABLE-3.1/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor: ObjEntityAttributeTab.java ObjEntityTab.java
Date Tue, 04 Dec 2012 17:35:55 GMT
Author: aadamchik
Date: Tue Dec  4 17:35:53 2012
New Revision: 1417052

URL: http://svn.apache.org/viewvc?rev=1417052&view=rev
Log:
CAY-1727 Modeler thinks entity is using inheritance when it doesn't

patch by idrabenia

(cherry picked from commit 1c2bb59b7608f18fd856c2a9064a2d61aa5a6e60)

Modified:
    cayenne/main/branches/STABLE-3.1/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityAttributeTab.java
    cayenne/main/branches/STABLE-3.1/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityTab.java

Modified: cayenne/main/branches/STABLE-3.1/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityAttributeTab.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityAttributeTab.java?rev=1417052&r1=1417051&r2=1417052&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityAttributeTab.java
(original)
+++ cayenne/main/branches/STABLE-3.1/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityAttributeTab.java
Tue Dec  4 17:35:53 2012
@@ -382,6 +382,11 @@ public class ObjEntityAttributeTab exten
     }
 
     public void objEntityAdded(EntityEvent e) {
+        if (e.getSource() == this) {
+            return;
+        }
+
+        this.rebuildTable((ObjEntity) e.getEntity());
     }
 
     public void objEntityRemoved(EntityEvent e) {

Modified: cayenne/main/branches/STABLE-3.1/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityTab.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityTab.java?rev=1417052&r1=1417051&r2=1417052&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityTab.java
(original)
+++ cayenne/main/branches/STABLE-3.1/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityTab.java
Tue Dec  4 17:35:53 2012
@@ -469,7 +469,9 @@ public class ObjEntityTab extends JPanel
         dbModel.setSelectedItem(entity.getDbEntity());
         dbEntityCombo.setRenderer(CellRenderers.entityListRendererWithIcons(map));
         dbEntityCombo.setModel(dbModel);
-        dbEntityCombo.setEnabled(entity.getSuperClassName() == null);
+
+        boolean isUsedInheritance = entity.getSuperEntity() != null;
+        dbEntityCombo.setEnabled(!isUsedInheritance);
 
         // toggle visibilty and editability rules
         



Mime
View raw message