[Zope-dev] 'has-a' relationships

Damian Morton morton@dennisinter.com
Sat, 18 Mar 2000 12:48:58 -0500


Im building an object heirarchy in which I want to define one-to-one 'has-a'
relationships which allow for both properties AND objects. For example, a
Story object 'has-a' heading, body and photo. In this case, the heading and
body would be text based properties, but the photo is an object. I guess
what I am trying to do is promote some kinds of objects to the level of
properties in zClasses. I can modify the zClass to add sub-objects at
instantiation time, but this doesnt provide guarantees that the added
objects wont be renamed or deleted, and the modification of the zClass
add_form needs to be done at the dtml level, rather than the property sheets
forms based level I am looking for. Does anyone have any Ideas as to how to
approach this?