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 85 85: def cloneable?(ref) 86: ref[:type] == :many_through_many || ref[:type] == :one_through_many 87: end
The default associated key alias(es) to use when eager loading associations via eager.
# File lib/sequel/plugins/many_through_many.rb, line 91 91: def default_associated_key_alias 92: 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 93: end
The alias for the first join table.
# File lib/sequel/plugins/many_through_many.rb, line 105 105: def join_table_alias 106: final_reverse_edge[:alias] 107: end
Many through many associations don‘t have a reciprocal
# File lib/sequel/plugins/many_through_many.rb, line 110 110: def reciprocal 111: nil 112: end