| 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 194
194: def default_key
195:
196: "#{underscore(demodulize(self[:model].name))}_id"
197: end
The column in the current table that the key in the associated table references.
# File lib/sequel/model/associations.rb, line 199
199: def primary_key
200: self[:primary_key] ||= self[:model].primary_key
201: 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 211
211: def reciprocal_array?
212: false
213: end