Ecto v1.1.0 Ecto.Association.BelongsTo

The association struct for a belongs_to association.

Its fields are:

  • cardinality - The association cardinality
  • field - The name of the association field on the model
  • owner - The model where the association was defined
  • related - The model that is associated
  • owner_key - The key on the owner model used for the association
  • related_key - The key on the related model used for the association
  • queryable - The real query to use for querying association
  • defaults - Default fields used when building the association