Caravela.Schema.Relation (Caravela v0.9.0)

Copy Markdown View Source

A relation between two entities.

  • from is the owning entity as declared in the DSL.
  • to is the related entity as declared.
  • type is one of :has_many, :has_one, :belongs_to, :many_to_many.

Summary

Types

t()

@type t() :: %Caravela.Schema.Relation{
  from: atom(),
  opts: keyword(),
  to: atom(),
  type: :has_many | :has_one | :belongs_to | :many_to_many
}