class Sequel::Plugins::ManyThroughMany::ManyThroughManyAssociationReflection

  1. lib/sequel/plugins/many_through_many.rb
Superclass: Sequel::Model::Associations::ManyToManyAssociationReflection

The AssociationReflection subclass for many_through_many associations.

Constants

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 ).freeze  

Public Instance methods

cloneable?(ref)

many_through_many and one_through_many associations can be clones

[show source]
   # File lib/sequel/plugins/many_through_many.rb
87 def cloneable?(ref)
88   ref[:type] == :many_through_many || ref[:type] == :one_through_many
89 end
default_associated_key_alias()

The default associated key alias(es) to use when eager loading associations via eager.

[show source]
   # File lib/sequel/plugins/many_through_many.rb
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_x
95 end
finalize_settings()
[show source]
    # File lib/sequel/plugins/many_through_many.rb
112 def finalize_settings
113   FINALIZE_SETTINGS
114 end
join_table_alias()

The alias for the first join table.

[show source]
    # File lib/sequel/plugins/many_through_many.rb
117 def join_table_alias
118   final_reverse_edge[:alias]
119 end
reciprocal()

Many through many associations don’t have a reciprocal

[show source]
    # File lib/sequel/plugins/many_through_many.rb
122 def reciprocal
123   nil
124 end
separate_query_per_table?()

Whether a separate query should be used for each join table.

[show source]
    # File lib/sequel/plugins/many_through_many.rb
127 def separate_query_per_table?
128   self[:separate_query_per_table]
129 end