Class: ROM::Associations::OneToMany

Inherits:
Abstract
  • Object
show all
Defined in:
core/lib/rom/associations/one_to_many.rb

Overview

Abstract one-to-many association

Direct Known Subclasses

OneToOne, Memory::Associations::OneToMany

Instance Method Summary collapse

Instance Method Details

#callObject

This method is abstract.

Adapters must implement this method

Raises:

  • (NotImplementedError)


16
17
18
# File 'core/lib/rom/associations/one_to_many.rb', line 16

def call(*)
  raise NotImplementedError
end

#foreign_keySymbol

Return configured or inferred FK name

Returns:

  • (Symbol)


25
26
27
# File 'core/lib/rom/associations/one_to_many.rb', line 25

def foreign_key
  definition.foreign_key || target.foreign_key(source.name)
end