cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject [1/2] cayenne git commit: Refresh Mapping Cache when remove DbEntity/ObjEntity
Date Tue, 09 Dec 2014 16:49:28 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master 053b0c222 -> 6438dc7e0


Refresh Mapping Cache when remove DbEntity/ObjEntity


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

Branch: refs/heads/master
Commit: 840592cf502d2446d52522c49e3f6ff5ce89ee73
Parents: 2d8ffba
Author: Savva Kolbachev <s.kolbachev@gmail.com>
Authored: Mon Dec 8 15:29:21 2014 +0300
Committer: Savva Kolbachev <s.kolbachev@gmail.com>
Committed: Mon Dec 8 15:29:21 2014 +0300

----------------------------------------------------------------------
 .../java/org/apache/cayenne/map/DataMap.java    | 34 +++++++++++++-------
 1 file changed, 22 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/840592cf/cayenne-server/src/main/java/org/apache/cayenne/map/DataMap.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/map/DataMap.java b/cayenne-server/src/main/java/org/apache/cayenne/map/DataMap.java
index 2d8be80..d209f34 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/map/DataMap.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/map/DataMap.java
@@ -19,18 +19,6 @@
 
 package org.apache.cayenne.map;
 
-import static java.util.Collections.emptyList;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.SortedMap;
-import java.util.TreeMap;
-
 import org.apache.cayenne.CayenneRuntimeException;
 import org.apache.cayenne.ObjectId;
 import org.apache.cayenne.Persistent;
@@ -48,6 +36,18 @@ import org.apache.cayenne.util.Util;
 import org.apache.cayenne.util.XMLEncoder;
 import org.apache.cayenne.util.XMLSerializable;
 
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.SortedMap;
+import java.util.TreeMap;
+
+import static java.util.Collections.emptyList;
+
 /**
  * Stores a collection of related mapping objects that describe database and
  * object layers of an application. DataMap contains DbEntities mapping database
@@ -982,6 +982,11 @@ public class DataMap implements Serializable, ConfigurationNode, XMLSerializable
 					}
 				}
 			}
+
+			MappingNamespace ns = getNamespace();
+			if (ns instanceof EntityResolver) {
+				((EntityResolver) ns).refreshMappingCache();
+			}
 		}
 	}
 
@@ -1013,6 +1018,11 @@ public class DataMap implements Serializable, ConfigurationNode, XMLSerializable
 					}
 				}
 			}
+
+			MappingNamespace ns = getNamespace();
+			if (ns instanceof EntityResolver) {
+				((EntityResolver) ns).refreshMappingCache();
+			}
 		}
 	}
 


Mime
View raw message