Class DataMapper::Associations::OneToMany::Relationship
In: lib/dm-core/associations/one_to_many.rb
Parent: Associations::Relationship

Methods

External Aliases

child_repository_name -> target_repository_name
  @api semipublic
child_model -> target_model
  @api semipublic
parent_repository_name -> source_repository_name
  @api semipublic
parent_model -> source_model
  @api semipublic
parent_key -> source_key
  @api semipublic

Public Class methods

Public Instance methods

@api semipublic

Returns a Collection for this relationship with a given source

@param [Resource] source

  A Resource to scope the collection with

@param [Query] other_query (optional)

  A Query to further scope the collection with

@return [Collection]

  The collection scoped to the relationship, source and query

@api private

@api semipublic

Loads and returns association targets (ex.: articles) for given source resource (ex.: author)

@api semipublic

Loads association targets and sets resulting value on given source resource

@param [Resource] source

  the source resource for the association

@return [undefined]

@api private

Sets value of association targets (ex.: paragraphs) for given source resource (ex.: article)

@api semipublic

target_key()

Alias for child_key

[Validate]