SV: [Zope] Are products the right approach?
-----Oprindelig meddelelse----- Fra: Alexis Roda [mailto:arv@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
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?
Sure. Python class doesn't care who uses it. --jcc -- "My point and period will be throughly wrought, Or well or ill, as this day's battle's fought."
participants (2)
-
Carsten Gehling -
J. Cameron Cooper