[Zope3-Users] OOBtrees & ZODB
Tim Cook
timothywayne.cook at gmail.com
Tue Jul 8 12:10:05 EDT 2008
I am building a platform where I want to initialize the ZODB (that will
be running under Zope) with three folders with sitemanagers.
If I use Folders like this:
if 'AR' not in root['Application']:
root['Application']['AR']=folder.Folder()
sm = LocalSiteManager(root['Application']['AR'])
root['Application']['AR'].setSiteManager(sm)
transaction.commit()
it works great and I can then add initial objects to the folders.
But, these folder sill potentially contain tens of thousands of objects
so I really want to use BTree Folders. But when I do this:
from zope.app.container.btree import BTreeContainer
... <lots of other stuff>
if 'AR' not in root['Application']:
root['Application']['AR']=BTreeContainer()
sm = LocalSiteManager(root['Application']['AR'])
root['Application']['AR'].setSiteManager(sm)
transaction.commit()
I get this:
File
"/home/tim/projects/ref_impl_python/TRUNK/oship/src/oship/atbldr/atbldr.py", line 78, in ?
root['Application']['AR'].setSiteManager(sm)
AttributeError: 'BTreeContainer' object has no attribute
'setSiteManager'
So BtreeContainers don't have a siteManager.
I would like to OOBTree but I have been unable to even discern the
proper way to import it.
Thanks.
Tim
--
Timothy Cook, MSc
Health Informatics Research & Development Services
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
Skype ID == timothy.cook
**************************************************************
*You may get my Public GPG key from popular keyservers or *
*from this link http://timothywayne.cook.googlepages.com/home*
**************************************************************
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.zope.org/pipermail/zope3-users/attachments/20080708/71ede0bb/attachment.bin
More information about the Zope3-users
mailing list