[Zope] Workaround for Pluggable Brains bug?

DA Loeffler David.Loeffler@bristol.ac.uk
Wed, 3 Jul 2002 17:03:26 +0100 (BST)


Hello,

I would like to ask if anyone knows of a workaround for a bug in
Pluggable Brains.

The bug is a well known one, and has been discussed on zope@zope.org at
least twice and reported to the Collector. However, there is no sign of
afix yet.

Essentially, the problem is that one cannot add one's own attributes to
a Pluggable Brain class. The most recent discussion of this is "[Zope]
bug in pluggable brains ?" posted by Geir Bkholt, 05/09/2002 10:02 PM.

The problem I am facing is this: to assemble a complicated set of data
from several SQL queries, fiddle the data extensively, then pass it on
bit by bit to a simple ZPT sitting in the foreground (it must be simple
enough to be edited by content managers without tinkering with the
business code). It must be able to pass the data on in bits, not all of
which will be used each time it is called (the user must be able to
select different levels of detail), so it cannot be a single method.

I had hoped to implement the data assembly object as a Pluggable Brain,
but the bug prevents me from storing data in it easily. How else can one
create a custom class for ephemeral objects which lie outside the main
Zope object database hierarchy and last only for the duration of one
transaction?


David Loeffler