ash v0.1.1 Ash.Resource.Relationships.BelongsTo View Source
The representation of a belongs_to relationship
Link to this section Summary
Link to this section Types
Link to this type
t()
View Sourcet() :: %Ash.Resource.Relationships.BelongsTo{
cardinality: :one,
define_field?: boolean(),
destination: Ash.resource(),
destination_field: atom(),
field_type: Ash.Type.t(),
name: atom(),
primary_key?: boolean(),
source_field: atom(),
type: :belongs_to
}
Link to this section Functions
Link to this function
new(name, related_resource, opts \\ [])
View Sourcenew(name :: atom(), related_resource :: Ash.resource(), opts :: Keyword.t()) :: {:ok, t()} | {:error, term()}