View Source Ecto.Association.BelongsTo (Ecto v3.11.1)
The association struct for a belongs_to
association.
Its fields are:
cardinality
- The association cardinalityfield
- The name of the association field on the schemaowner
- The schema where the association was definedowner_key
- The key on theowner
schema used for the associationrelated
- The schema that is associatedrelated_key
- The key on therelated
schema used for the associationqueryable
- The real query to use for querying associationdefaults
- Default fields used when building the associationrelationship
- The relationship to the specified schema, default:parent
on_replace
- The action taken on associations when schema is replaced