cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r647149 - /cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectController.java
Date Fri, 11 Apr 2008 12:51:12 GMT
Author: aadamchik
Date: Fri Apr 11 05:51:08 2008
New Revision: 647149

URL: http://svn.apache.org/viewvc?rev=647149&view=rev
Log:
CAY-868 Deprecate EventManager.getDefaultManager() and stop using it
(modeler cleanup)

Modified:
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectController.java

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectController.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectController.java?rev=647149&r1=647148&r2=647149&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectController.java
(original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectController.java
Fri Apr 11 05:51:08 2008
@@ -1293,9 +1293,9 @@
     /** Notifies all listeners of the change(add, remove) and does the change. */
     public void fireDbRelationshipEvent(RelationshipEvent e) {
         setDirty(true);
-
-        if (currentState.map != null && e.getId() == MapEvent.CHANGE) {
-            currentState.map.dbRelationshipChanged(e);
+        
+        if(e.getId() == MapEvent.CHANGE && e.getEntity() instanceof DbEntity) {
+            ((DbEntity) e.getEntity()).dbRelationshipChanged(e);
         }
 
         EventListener[] list = listenerList.getListeners(DbRelationshipListener.class);



Mime
View raw message