Class Sequel::Model::Associations::OneToManyAssociationReflection
In: lib/sequel/model/associations.rb
Parent: AssociationReflection

Methods

Public Instance methods

Default foreign key name symbol for key in associated table that points to current table‘s primary key.

[Source]

     # File lib/sequel/model/associations.rb, line 201
201:         def default_key
202: 
203:           "#{underscore(demodulize(self[:model].name))}_id"
204:         end
eager_loader_key()

Alias for primary_key

The column in the current table that the key in the associated table references.

[Source]

     # File lib/sequel/model/associations.rb, line 206
206:         def primary_key
207:          self[:primary_key] ||= self[:model].primary_key
208:         end

Whether the reciprocal of this association returns an array of objects instead of a single object, false for a one_to_many association.

[Source]

     # File lib/sequel/model/associations.rb, line 218
218:         def reciprocal_array?
219:           false
220:         end

One to many associations set the reciprocal to self when loading associated records.

[Source]

     # File lib/sequel/model/associations.rb, line 212
212:         def set_reciprocal_to_self?
213:           true
214:         end

[Validate]