[PEAK] model.Collection naming
Phillip J. Eby
pje at telecommunity.com
Wed Aug 4 11:42:57 EDT 2004
At 10:23 AM 8/4/04 +0200, Lars Heuer wrote:
>class Customer(model.Element):
>
> class groups(model.Collection):
> referencedType = Group
>
>
>Instances of the Customer class will have a addGroups method, but this
>naming doesn't model the semantics, because only one group is added.
>
>I want the following Customer instance methods:
>Customer.addGroup()
>Customer.removeGroup()
>Customer.getGroups() (this method should be equivalent with accessing
> Customer.groups)
>
>How can I model it with PEAK?
class groups(model.Collection):
singularName = 'group'
referencedType = Group
More information about the PEAK
mailing list