SV: [Zope] Are products the right approach?

Carsten Gehling carsten at sarum.dk
Mon Sep 22 04:39:49 EDT 2003


> -----Oprindelig meddelelse-----
> Fra: Alexis Roda [mailto:arv at si.urv.es]
> Sendt: 18. september 2003 10:26

> Zope provides a very nice feature, the pluggable brains. In short, a
> pluggable brain associates a class (python class) to a zsql method so
> the rows returned by the query are wrapped with objects of the given
> class. Its a kind of simple object persistance over a RDBMS system.
>
> To learn more about pluggable brains read the section "Binding Classes
> to Result Objects", chapter "Relational Database Connectivity" of the
> zope book.

Hmm this might be what I'm looking for. Can I bind the same class to more
than one ZSQL method? Say for example, that I want to do a join between a
log entry and a Equipment record (assuming that I make Equipment as a
table). Can I then apply the Equipment class to both this ZSQL method and a
more "simple" one that just retrieves Equipment records?

- Carsten




More information about the Zope mailing list