ash v1.24.1 Ash.Resource.Dsl.HasMany View Source
Link to this section Summary
Link to this section Functions
Declares a has_many relationship. There can be any number of related entities.
# In a resource called `Word` has_many :definitions, DictionaryDefinition, source_field: :text, destination_field: :word_text
:name- The name of the relationship
:destination- The destination resource
:destination_field- Required. The field on the related resource that should match the
source_fieldon this resource.
:source_field- The field on this resource that should match the
destination_fieldon the related resource. The default value is
:writable?- Whether or not the relationship may be edited. The default value is
:description- An optional description for the relationship
:private?- Whether or not the relationship will appear in any interfaces created off of this resource, e.g AshJsonApi and AshGraphql The default value is