Class | Sequel::Model::Associations::OneToManyAssociationReflection |
In: |
lib/sequel/model/associations.rb
|
Parent: | AssociationReflection |
Default foreign key name symbol for key in associated table that points to current table‘s primary key.
# File lib/sequel/model/associations.rb, line 201 201: def default_key 202: 203: "#{underscore(demodulize(self[:model].name))}_id" 204: end
The column in the current table that the key in the associated table references.
# 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.
# File lib/sequel/model/associations.rb, line 218 218: def reciprocal_array? 219: false 220: end