[PEAK] More trouble with my relation

R. David Murray rdmurray at bitdance.com
Thu Oct 21 13:55:04 EDT 2004


On Thu, 21 Oct 2004, Phillip J. Eby wrote:
> If you had a valid master account already present, it would need to unlink
> the reverse link, from the subaccounts field.  So, the issue here is that
> you shouldn't use 'None' as the value for a field that's a bidirectional
> link.  Note that this is different from having the field's 'defaultValue'
> set to None.  'defaultValue' is what gets returned when the attribute *has
> no value*.  When dealing with the object's internal state (in a DM), you
> must reflect the internal state, not the object's API.

Ah.  Of course.  I knew I must be missing a step but I couldn't see it.
My misunderstanding about defaultValue was what had me confused, I
think.  I will try it.

> In the general case for a relational mapping, however, you would use a
> QueryLink and not bother with whether it's empty or not. See 'peak help
> storage.QueryLink' for more details.

Thanks.  The trick with PEAK is always know *what* to look at to
solve a problem....I looked at the Bulletins example, but I didn't
look at right part of it.

--David



More information about the PEAK mailing list