Title: [commits] (vajda) [11141] - fixed bug, subkind caches need to be flushed when superkinds are refreshed
Revision
11141
Author
vajda
Date
2006-07-12 16:31:26 -0700 (Wed, 12 Jul 2006)

Log Message

- fixed bug, subkind caches need to be flushed when superkinds are refreshed
- fixed bug in getItemVersion() missing view arg

Modified Paths

Diff

Modified: trunk/chandler/repository/persistence/DBRepositoryView.py (11140 => 11141)

--- trunk/chandler/repository/persistence/DBRepositoryView.py	2006-07-12 23:30:53 UTC (rev 11140)
+++ trunk/chandler/repository/persistence/DBRepositoryView.py	2006-07-12 23:31:26 UTC (rev 11141)
@@ -232,7 +232,14 @@
             if kind is not None:
                 kind.extent._collectionChanged('refresh', 'collection',
                                                'extent', uItem)
-                
+
+                if status & CItem.SCHEMA and kind.isKindOf(kind.getKindKind()):
+                    names = dirtyNames()
+                    if 'attributes' in names:
+                        self[uItem].flushCaches('attributes')
+                    elif 'superKinds' in names:
+                        self[uItem].flushCaches('superKinds')
+
                 dispatch = self.findValue(uItem, 'watcherDispatch', None, version)
                 if dispatch:
                     isNew = (status & CItem.NEW) != 0

Modified: trunk/chandler/repository/persistence/RepositoryView.py (11140 => 11141)

--- trunk/chandler/repository/persistence/RepositoryView.py	2006-07-12 23:30:53 UTC (rev 11140)
+++ trunk/chandler/repository/persistence/RepositoryView.py	2006-07-12 23:31:26 UTC (rev 11141)
@@ -1021,7 +1021,7 @@
 
     def getItemVersion(self, version, item):
 
-        return self.repository.store.getItemVersion(version, item._uuid)
+        return self.repository.store.getItemVersion(self, version, item.itsUUID)
 
     def importItem(self, item):
 

Modified: trunk/chandler/repository/schema/Kind.py (11140 => 11141)

--- trunk/chandler/repository/schema/Kind.py	2006-07-12 23:30:53 UTC (rev 11140)
+++ trunk/chandler/repository/schema/Kind.py	2006-07-12 23:31:26 UTC (rev 11141)
@@ -596,6 +596,10 @@
 
         return self.find(CORE)['Item']
 
+    def getKindKind(self):
+
+        return self.find(CORE)['Kind']
+
     def mixin(self, superKinds):
         """
         Find or generate a mixin kind.




_______________________________________________
Commits mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/commits

Reply via email to