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.
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
The alias for the first join table.
# File lib/sequel/plugins/many_through_many.rb, line 107 107: def join_table_alias 108: final_reverse_edge[:alias] 109: end
Many through many associations don‘t have a reciprocal
# File lib/sequel/plugins/many_through_many.rb, line 112 112: def reciprocal 113: nil 114: end