On this page
Ecto.Association.BelongsTo
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 theownerschema used for the associationrelated- The schema that is associatedrelated_key- The key on therelatedschema 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:parenton_replace- The action taken on associations when schema is replaced
© 2013 Plataformatec
© 2020 Dashbit
Licensed under the Apache License, Version 2.0.
https://hexdocs.pm/ecto/Ecto.Association.BelongsTo.html