ash v0.10.0 Ash.Dsl.HasMany View Source
Link to this section Summary
Functions
Declares a has_many relationship. There can be any number of related entities.
Link to this section Functions
Declares a has_many relationship. There can be any number of related entities.
Examples
# In a resource called `Word`
has_many :definitions, DictionaryDefinition,
source_field: :text,
destination_field: :word_text
Arguments
:name
- The name of the relationship:destination
- The destination resource
Options
:destination_field
- Required. The field on the related resource that should match thesource_field
on this resource.:source_field
- false The field on this resource that should match thedestination_field
on the related resource. The default value is:id
.