entity.py
changeset 5573 8dfb1726526b
parent 5559 6b183d860295
child 5726 c3b99606644d
--- a/entity.py	Fri May 21 15:06:29 2010 +0200
+++ b/entity.py	Fri May 21 18:39:40 2010 +0200
@@ -937,6 +937,7 @@
         """
         if rtype is None:
             self._cw_related_cache = {}
+            self._cw_adapters_cache = {}
         else:
             assert role
             self._cw_related_cache.pop('%s_%s' % (rtype, role), None)
@@ -953,17 +954,12 @@
         self._cw_completed = False
         self.clear()
         # clear relations cache
-        for rschema, _, role in self.e_schema.relation_definitions():
-            self.cw_clear_relation_cache(rschema.type, role)
+        self.cw_clear_relation_cache()
         # rest path unique cache
         try:
             del self.__unique
         except AttributeError:
             pass
-        try:
-            del self._cw_adapters_cache
-        except AttributeError:
-            pass
 
     # raw edition utilities ###################################################