clear eschema caches on schema changes stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 15 Oct 2009 20:31:13 +0200
branchstable
changeset 3692 54aa8d13aab4
parent 3691 ccd72f500daa
child 3693 92581287726f
clear eschema caches on schema changes
cwvreg.py
--- a/cwvreg.py	Thu Oct 15 20:30:40 2009 +0200
+++ b/cwvreg.py	Thu Oct 15 20:31:13 2009 +0200
@@ -298,9 +298,11 @@
         self.register_objects(searchpath, force_reload=False)
         # map lowered entity type names to their actual name
         self.case_insensitive_etypes = {}
-        for etype in self.schema.entities():
-            etype = str(etype)
+        for eschema in self.schema.entities():
+            etype = str(eschema)
             self.case_insensitive_etypes[etype.lower()] = etype
+            clear_cache(eschema, 'ordered_relations')
+            clear_cache(eschema, 'meta_attributes')
 
     def _set_schema(self, schema):
         """set instance'schema"""