cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From and...@apache.org
Subject svn commit: r813555 - in /cayenne/main/trunk: docs/doc/src/main/resources/RELEASE-NOTES.txt framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/MergerOptions.java
Date Thu, 10 Sep 2009 19:30:09 GMT
Author: andrey
Date: Thu Sep 10 19:30:09 2009
New Revision: 813555

URL: http://svn.apache.org/viewvc?rev=813555&view=rev
Log:
CAY-1245 Merging to-model fails

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/dialog/db/MergerOptions.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=813555&r1=813554&r2=813555&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 Thu Sep 10 19:30:09 2009
@@ -38,6 +38,7 @@
 CAY-1229 Fixing DB2 Tests
 CAY-1232 Unit tests failing on Sybase
 CAY-1240 Schema generation dialog has "uncheck all tables" checkbox incorrectly checked by
default
+CAY-1245 Merging to-model fails
 CAY-1246 Naming strategy getting stuck in (incorrect) preferences location
 CAY-1248 ClassCastException with OracleLOBBatchAction
 CAY-1250 Prefetching doesn't work with prefetched subentity

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/MergerOptions.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/MergerOptions.java?rev=813555&r1=813554&r2=813555&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/MergerOptions.java
(original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/MergerOptions.java
Thu Sep 10 19:30:09 2009
@@ -266,15 +266,21 @@
         final ModelMergeDelegate delegate = new ModelMergeDelegate (){
 
             public void dbAttributeAdded(DbAttribute att) {
-                c.fireDbAttributeDisplayEvent(new AttributeDisplayEvent(src, att, att.getEntity(),
dataMap, domain));
+                if (c.getCurrentDbEntity() == att.getEntity()) {
+                    c.fireDbAttributeDisplayEvent(new AttributeDisplayEvent(src, att, att.getEntity(),
dataMap, domain));
+                }
             }
 
             public void dbAttributeModified(DbAttribute att) {
-                c.fireDbAttributeDisplayEvent(new AttributeDisplayEvent(src, att, att.getEntity(),
dataMap, domain));
+                if (c.getCurrentDbEntity() == att.getEntity()) {
+                    c.fireDbAttributeDisplayEvent(new AttributeDisplayEvent(src, att, att.getEntity(),
dataMap, domain));
+                }
             }
 
             public void dbAttributeRemoved(DbAttribute att) {
-                c.fireDbAttributeDisplayEvent(new AttributeDisplayEvent(src, att, att.getEntity(),
dataMap, domain));
+                if (c.getCurrentDbEntity() == att.getEntity()) {
+                    c.fireDbAttributeDisplayEvent(new AttributeDisplayEvent(src, att, att.getEntity(),
dataMap, domain));
+                }
             }
 
             public void dbEntityAdded(DbEntity ent) {
@@ -288,23 +294,33 @@
             }
 
             public void dbRelationshipAdded(DbRelationship rel) {
-                c.fireDbRelationshipDisplayEvent(new RelationshipDisplayEvent(src, rel, rel.getSourceEntity(),
dataMap, domain));
+                if (c.getCurrentDbEntity() == rel.getSourceEntity()) {
+                    c.fireDbRelationshipDisplayEvent(new RelationshipDisplayEvent(src, rel,
rel.getSourceEntity(), dataMap, domain));
+                }
             }
 
             public void dbRelationshipRemoved(DbRelationship rel) {
-                c.fireDbRelationshipDisplayEvent(new RelationshipDisplayEvent(src, rel, rel.getSourceEntity(),
dataMap, domain));
+                if (c.getCurrentDbEntity() == rel.getSourceEntity()) {
+                    c.fireDbRelationshipDisplayEvent(new RelationshipDisplayEvent(src, rel,
rel.getSourceEntity(), dataMap, domain));
+                }
             }
 
             public void objAttributeAdded(ObjAttribute att) {
-                c.fireObjAttributeDisplayEvent(new AttributeDisplayEvent(src, att, att.getEntity(),
dataMap, domain));
+                if (c.getCurrentObjEntity() == att.getEntity()) {
+                    c.fireObjAttributeDisplayEvent(new AttributeDisplayEvent(src, att, att.getEntity(),
dataMap, domain));
+                }
             }
 
             public void objAttributeModified(ObjAttribute att) {
-                c.fireObjAttributeDisplayEvent(new AttributeDisplayEvent(src, att, att.getEntity(),
dataMap, domain));
+                if (c.getCurrentObjEntity() == att.getEntity()) {
+                    c.fireObjAttributeDisplayEvent(new AttributeDisplayEvent(src, att, att.getEntity(),
dataMap, domain));
+                }
             }
 
             public void objAttributeRemoved(ObjAttribute att) {
-                c.fireObjAttributeDisplayEvent(new AttributeDisplayEvent(src, att, att.getEntity(),
dataMap, domain));
+                if (c.getCurrentObjEntity() == att.getEntity()) {
+                    c.fireObjAttributeDisplayEvent(new AttributeDisplayEvent(src, att, att.getEntity(),
dataMap, domain));
+                }
             }
 
             public void objEntityAdded(ObjEntity ent) {
@@ -318,11 +334,15 @@
             }
 
             public void objRelationshipAdded(ObjRelationship rel) {
-                c.fireObjRelationshipDisplayEvent(new RelationshipDisplayEvent(src, rel,
rel.getSourceEntity(), dataMap, domain));
+                if (c.getCurrentObjEntity() == rel.getSourceEntity()) {
+                    c.fireObjRelationshipDisplayEvent(new RelationshipDisplayEvent(src, rel,
rel.getSourceEntity(), dataMap, domain));
+                }
             }
 
             public void objRelationshipRemoved(ObjRelationship rel) {
-                c.fireObjRelationshipDisplayEvent(new RelationshipDisplayEvent(src, rel,
rel.getSourceEntity(), dataMap, domain));
+                if (c.getCurrentObjEntity() == rel.getSourceEntity()) {
+                    c.fireObjRelationshipDisplayEvent(new RelationshipDisplayEvent(src, rel,
rel.getSourceEntity(), dataMap, domain));
+                }
             }
             
         };



Mime
View raw message