ash v0.1.8 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(), reverse_relationship: term(), source: Ash.resource(), source_field: atom() | nil, type: :belongs_to }
Link to this section Functions
Link to this function
new(resource, name, related_resource, opts \\ [])
View Sourcenew( resource :: Ash.resource(), name :: atom(), related_resource :: Ash.resource(), opts :: Keyword.t() ) :: {:ok, t()} | {:error, term()}