[ZODB-Dev] Re: Ape and retrieval of other zodb items

Rocky Burt rocky.burt at bricsnet.com
Thu May 1 21:00:25 EDT 2003


On Thu, 2003-05-01 at 15:06, Shane Hathaway wrote:
> > Well, an alternative to this for me would be that if I could get the
> > attribute name (id) being requested from the event object on the
> > load(event) call.  But it seems to me that its impossible to get that
> > info as well (or is it?)
> 
> What attribute name?  If you're talking about the name of the attribute 
> that a Zope application requests, that information isn't even revealed 
> to Python.
> 

In this case (since I'm mapping properties) I was referring to the 'id'
or property name.


> > ps.  I don't need access to the object, I just need access to the class
> > that the object is derived from ;)
> 
> Right, but ZClasses only exist in the live object system, and gateways 
> can't see the live object system.
> 
> Could you explain more of what you're trying to do?

What I'm trying to do is provide my own SQLProperties gateway (I have my
own hooked in and confirmed in-use).  This gateway, instead of
storing/loading to/from a zodb_properties table is instead doing its
work on a table by the name of whatever class_name its identified by
from the classifier.

So, instead of saving each property in a id, type, value tuple, I'd be
storing each property as a column name in the table which represents the
class I'm dealing with.

In order to do this I need to know beforehand what properties the class
can possibly have (in order to generate applicable sql).  At a minimum,
during the load/store calls I need to know the name of the
attribute/property being loaded/stored so I know which table column to
access.

Any idea's ?

- Rocky





More information about the ZODB-Dev mailing list