[Zope] Persistent references to persistent objects ?!?!

Jean-Francois.Doyon at CCRS.NRCan.gc.ca Jean-Francois.Doyon at CCRS.NRCan.gc.ca
Thu Feb 5 16:38:19 EST 2004


G'day,

I was toying with a few ideas, and discovered that I can actually store in a
persistent manner references to other persistent objects !!

I for instance have a persistent object that has, as an attribute, a
reference to another persistent object (Done using Python's standard shallow
copying: self.attribute = object).  I use this in a scenario much like DB
connections/ZSQL Methods, where the ZSQL MEthod would have a stored
persistent reference to it's connection object.

This is nice because it allows to point to an object without using paths and
traversal (So it's quick and dirty), and the reference is maintained through
a rename.

I can see some problems related to security, such as if traversal is not
used, then some security can be by-passed ...

In my few years of using Zope I've never heard of any one using this ... Has
anybody ? What are the official pro's and con's ?

Thanks,

Jean-François Doyon
Internet Service Development and Systems Support / Développement des
services et soutien de systèmes Internet
GeoAccess Division / Division GéoAccès
Canada Center for Remote Sensing / Centre canadien de télédétection
Natural Resources Canada / Ressources naturelles Canada
http://atlas.gc.ca
Phone: (613) 992-4902
Fax: (613) 947-2410




More information about the Zope mailing list