On Fri, Jun 6, 2008 at 7:26 PM, Fred Drake <[EMAIL PROTECTED]> wrote:
> On Fri, Jun 6, 2008 at 8:08 PM, Sean Upton <[EMAIL PROTECTED]> wrote:
>> mechanism or implementation details underneath, so I think I'll
>> continue to use custom field types marked with an IRelationshipField
>> interface, and assume the built-in Object, List fields are only used
>> for containment.  The only thing I do not like about my direction is
> I'd rather not make any assumption at all; use two interfaces: one
> that indicates references, and one that indicates containment.  That
> allows you to raise an exception for fields that don't specify, which
> would be useful during testing and debugging.  For each such field
> found, you'll get to decide how to handle it and stamp the appropriate
> interface on the field.

Makes sense, so I would have two subclasses of zope.schema.Object, one
for containment, another for association -- each with respective
interfaces and validation behavior.  Explicit declaration of intent
for each field is what I'm aiming for anyway.  Thanks.

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to