Class | Sequel::Plugins::ManyThroughMany::ManyThroughManyAssociationReflection |
In: |
lib/sequel/plugins/many_through_many.rb
|
Parent: | Sequel::Model::Associations::ManyToManyAssociationReflection |
The AssociationReflection subclass for many_through_many associations.
FINALIZE_SETTINGS | = | superclass::FINALIZE_SETTINGS.merge( :associated_key_table=>:associated_key_table, :edges=>:edges, :final_edge=>:final_edge, :final_reverse_edge=>:final_reverse_edge, :reverse_edges=>:reverse_edges |
many_through_many and one_through_many associations can be clones
# File lib/sequel/plugins/many_through_many.rb, line 87 87: def cloneable?(ref) 88: ref[:type] == :many_through_many || ref[:type] == :one_through_many 89: end
The default associated key alias(es) to use when eager loading associations via eager.
# File lib/sequel/plugins/many_through_many.rb, line 93 93: def default_associated_key_alias 94: self[:uses_left_composite_keys] ? (0...self[:through].first[:left].length).map{|i| "x_foreign_key_#{i}_x""x_foreign_key_#{i}_x"} : :x_foreign_key_x 95: end
# File lib/sequel/plugins/many_through_many.rb, line 113 113: def finalize_settings 114: FINALIZE_SETTINGS 115: end
The alias for the first join table.
# File lib/sequel/plugins/many_through_many.rb, line 118 118: def join_table_alias 119: final_reverse_edge[:alias] 120: end
Many through many associations don‘t have a reciprocal
# File lib/sequel/plugins/many_through_many.rb, line 123 123: def reciprocal 124: nil 125: end