On Oct 3, 2005, at 4:45 AM, Andreas Jung wrote:


I am currently thinking about for a new version of PloneCollectorNG based on Zope 3. The currently implementation uses per-instances schemas (acquired from a parent object managing the schema). How would you do that in Zope 3?

It sounds like you want persistent schemas. Although there is some code in Zope 3 going in that direction, to my knowledge it does not work right now.

Another question: in Zope 3 we have FieldProperties that automatically handle setting and getting values. This implementation stores the values as instance attributes. What would be the recommended way to store attributes in a RDBMS instead inside the ZODB? By introducing a new RDBMSFieldProperty that handles the set/get methods in the same way as the FieldProperty implementation?

That might be one way of doing it. You'd have to have a unique key for the object in the RDBMS; maybe an intid would be the way to look. It might get a little bit tricky, as relying ion intids means that you start requiring that your object be placed in the ZODB before you set the attributes. I'd be tempted to look for approaches already working in the field.

So, alternatively, you might want to look at APE for the RDBMS side of things, so that your code just puts attributes on the object, and the storage is responsible for the RDBMS side. A third approach might be http://codespeak.net/z3/sqlos/.

Zope3-users mailing list

Reply via email to