betty.collections.to_many module¶
Collections for to-many associations.
- final class betty.collections.to_many.ToManyCollection¶
Bases:
MutableCollection,Sequence,GenericA collection of *-to-many associates.
- __init__(owner: OwnerT, association: ToMany[OwnerT, AssociateT], *associates: Associate[OwnerT, AssociateT])¶
- associate(*associates: AssociateT) None¶
Add associates.
This behaves similar to :py:meth:betty.association.Association.associate` and MUST only be called by
betty.associations.to_many.ToMany.
- disassociate(*associates: AssociateT) None¶
Remove associates.
This behaves similar to :py:meth:betty.association.Association.disassociate` and MUST only be called by
betty.associations.to_many.ToMany.