[Zope-dev] ObjectManagers and their children

Ty Sarna tsarna@endicor.com
11 Nov 1999 19:40:14 GMT


In article <3826F005.7429DD42@digicool.com>,
Michel Pelletier  <michel@digicool.com> wrote:
> Consists of two file, BTreeObjectManager.py and BTreeFolder.py.  Both go
> in OFS (but it would probably be smart to make a seperate Product).

BTW, I wrote something like this a month back or so called ZRack, which
is similar.  It was based onm BTree at first, but I later changed it to
use Phillip Eby's simpletree, which has better write performance
(doesn't always have to update one page per level of the tree). It also
will assign id's for you, if you want.

At any rate, one problem I ran into is that the ZClass support doesn't
interract well with objectmanager's that don't support __getattr__.
Adding a ZClass instance wants to add the instance, and then immediately
getattr it back out.

It was easy to hack around this, but it sure would be nice if the
tree-ObjectManager *could* support getattr. The inability to override
__getattr_ on Persistent subclasses keeps biting me (and others, from
what I see on the lists) again and again. It would be *really* nice if
this could be fixed. I'd even be happy with something like "You can't
override __getattr_, but if you define __foo_getattr__, persistent will
try it before returning AttributeError".