You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by aa...@apache.org on 2009/10/27 11:24:59 UTC

svn commit: r830119 - in /cayenne/main/trunk: docs/doc/src/main/resources/RELEASE-NOTES.txt framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityTab.java

Author: aadamchik
Date: Tue Oct 27 10:24:58 2009
New Revision: 830119

URL: http://svn.apache.org/viewvc?rev=830119&view=rev
Log:
CAY-1292 Modeler does not allow to unset/change entity inheritance

patch by Olga Tkachova

Modified:
    cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityTab.java

Modified: cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt?rev=830119&r1=830118&r2=830119&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt Tue Oct 27 10:24:58 2009
@@ -8,6 +8,14 @@
 http://issues.apache.org/cayenne/
 
 ----------------------------------
+Release: 3.0 beta 2
+Date: 
+----------------------------------
+Bug Fixes Since B1:
+
+CAY-1292 Modeler does not allow to unset/change entity inheritance
+
+----------------------------------
 Release: 3.0 beta 1
 Date: 
 ----------------------------------

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityTab.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityTab.java?rev=830119&r1=830118&r2=830119&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityTab.java (original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityTab.java Tue Oct 27 10:24:58 2009
@@ -267,9 +267,12 @@
                 ObjEntity entity = mediator.getCurrentObjEntity();
 
                 if (!Util.nullSafeEquals(name, entity.getSuperEntityName())) {
-                    List<ObjAttribute> duplicateAttributes = getDuplicatedAttributes((ObjEntity) superEntity);
+                    List<ObjAttribute> duplicateAttributes = null;
+                    if(name!=null){
+                        duplicateAttributes = getDuplicatedAttributes((ObjEntity) superEntity);
+                    }
 
-                    if (duplicateAttributes.size() > 0) {
+                    if (duplicateAttributes!=null && duplicateAttributes.size() > 0) {
                         DuplicatedAttributesDialog.showDialog(Application.getFrame(), duplicateAttributes, (ObjEntity) superEntity, entity);
                         if (DuplicatedAttributesDialog.getResult().equals(DuplicatedAttributesDialog.CANCEL_RESULT)) {
                             superEntityCombo.setSelectedItem(entity.getSuperEntity());