external method:
def updateall(self,updatemethod, metatypes=['Session Id Manager']): sss = self.ZopeFind(self,obj_metatypes=metatypes) print sss
when I do http://mysite.com/updateall, I get:
[]
...printed from the Zope console... what am I doing wrong?
Nothing, AFAICT. Looking in to it.
Hmmm... I didn't exlain myself very well. In one of the places we're using a catalog, we don't _have_ a RID. We had been generating integers and using those as both keys in a BTree and RID's for the catalog. Now catalog wants RID's to be strings but OOBTrees are inefficient :-S
...then I thought 'well, UIDs are just what we want' but I'm not sure there's a way to just give ZCatalog an object (without supplying a RID) and have ZCatalog return the RID... any ideas?
Why are you worrying about it? I never said that OOBTrees are inefficient, I just said that IOBTrees are *more* efficient than OOBTrees. This sounds like a premature optimization. Using the Zope profiler (in the debug panel) can confirm this, it's quite handy. You always have a RID (it's autogenerated for each item added to the catalog). And you always have a UID as well (it's what you pass in to catalog_object -- and in the latest ZCatalog release it doesn't need to be passed in, it's the "getPhysicalPath" of the object passed in if has one). If your objects are persistent and traversable, it's best just to use the defaults from the Catalog and pass the UID in as the physical path (or let the catalog figure it out for you). That said, a catalog UID can be any sort of object... it doesn't need to be a string. If you don't use the physical path as a UID, you need to do a few more things manually. Catalog RIDs are an implementation detail and probably shouldn't be used outside of the catalog.