betty.associations.to_many module¶
To-many entity associations.
- final class betty.associations.to_many.ToMany¶
Bases:
Association[OwnerT,AssociateT,ToManyCollection,ToManyAssociates,DataDefinition],GenericA *-to-many entity association.
- __init__(associate: str | type[AssociateT], associate_attr: str | None = None, /, *, description: ResolvableLocalizable | None = None, label: ResolvableLocalizable)¶
- async dump_linked_data_for(project: Project, owner: OwnerT, /) PortableData¶
Dump the given target to JSON-LD.
- get(owner: OwnerT, /) ToManyCollection[OwnerT, AssociateT]¶
Get the property value from the owner.
- get_associates(owner: OwnerT, /) Iterable[AssociateT]¶
Get the associates for the given owner.
- is_resolver(value: Associate[OwnerT, AssociateT], /) TypeGuard[AssociateResolver[OwnerT, AssociateT]]¶
Test that the value is an entity (associate) resolver.
- async linked_data_schema_for(project: Project, /) Schema¶
Define the JSON Schema for
betty.linked_data.LinkedDataDumper.dump_linked_data_for().
- resolve(project: Project, owner: OwnerT, /) None¶
Resolve any associates the owner may have for this association.