betty.entity.association module¶
Entity associations.
- final class betty.entity.association.AssociationRegistry¶
Bases:
objectInspect any known entity type associations.
- exception betty.entity.association.AssociationRequired¶
Bases:
RuntimeError,GenericRaised when an operation cannot be performed because the association in question is required.
- __init__(association: _Association[OwnerT, Any], owner: OwnerT, /)¶
- final class betty.entity.association.BidirectionalToManyMultipleTypes¶
Bases:
_ToManyAssociation[OwnerT,AssociateT,MultipleTypesEntityCollection],_BidirectionalAssociation,GenericA bidirectional \*-to-many entity type association where associates may be of different entity types.
- final class betty.entity.association.BidirectionalToManySingleType¶
Bases:
_ToManyAssociation[OwnerT,AssociateT,SingleTypeEntityCollection],_BidirectionalAssociation,GenericA bidirectional \*-to-many entity type association where all associates are of the same entity type.
- final class betty.entity.association.BidirectionalToOne¶
Bases:
_ToOneAssociation,_BidirectionalAssociation,GenericA bidirectional \*-to-one entity type association.
- final class betty.entity.association.BidirectionalToZeroOrOne¶
Bases:
_ToZeroOrOneAssociation,_BidirectionalAssociation,GenericA bidirectional \*-to-zero-or-one entity type association.
- class betty.entity.association.TemporaryToManyResolver¶
Bases:
_TemporaryResolver[Iterable],ToManyResolver,GenericA ‘temporary’ to-many resolver.
This is helpful to satisfy association requirements in multiple steps. Users MUST ensure that this resolver is replaced by a real value, because the resolver will never be able to resolve itself.
- class betty.entity.association.TemporaryToOneResolver¶
Bases:
_TemporaryResolver,ToOneResolver,GenericA ‘temporary’ to-one resolver.
This is helpful to satisfy association requirements in multiple steps. Users MUST ensure that this resolver is replaced by a real value, because the resolver will never be able to resolve itself.
- class betty.entity.association.TemporaryToZeroOrOneResolver¶
Bases:
_TemporaryResolver[EntityT|None],ToZeroOrOneResolver,GenericA ‘temporary’ to-zero-or-one resolver.
This is helpful to satisfy association requirements in multiple steps. Users MUST ensure that this resolver is replaced by a real value, because the resolver will never be able to resolve itself.
- class betty.entity.association.ToManyResolver¶
Bases:
_Resolver[Iterable],GenericAn object that can resolve to a collection of entities.
- class betty.entity.association.ToOneResolver¶
Bases:
_Resolver,GenericAn object that can resolve to an entity.
- class betty.entity.association.ToZeroOrOneResolver¶
Bases:
_Resolver[EntityT|None],GenericAn object that can optionally resolve to an entity.
- final class betty.entity.association.UnidirectionalToManyMultipleTypes¶
Bases:
_ToManyAssociation[OwnerT,AssociateT,MultipleTypesEntityCollection],GenericA unidirectional to-many entity type association where associates may be of different entity types.
- final class betty.entity.association.UnidirectionalToManySingleType¶
Bases:
_ToManyAssociation[OwnerT,AssociateT,SingleTypeEntityCollection],GenericA unidirectional to-many entity type association where all associates are of the same entity type.
- final class betty.entity.association.UnidirectionalToOne¶
Bases:
_ToOneAssociation,GenericA unidirectional to-one entity type association.