[PEAK] model.Collection naming
Lars Heuer
heuer at quixs.com
Wed Aug 4 04:23:55 EDT 2004
Hi all,
I've question regarding the naming of the modifiers of a collection:
Given, I've the following classes:
class Group(model.Element):
pass
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?
TIA and best regards,
Lars
More information about the PEAK
mailing list