class Sequel::Plugins::ManyThroughMany::ManyThroughManyAssociationReflection

The AssociationReflection subclass for many_through_many associations.

Constants

FINALIZE_SETTINGS

Public Instance Methods

cloneable?(ref) click to toggle source

many_through_many and one_through_many associations can be clones

   # 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() click to toggle source

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

   # 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() click to toggle source
    # File lib/sequel/plugins/many_through_many.rb
112 def finalize_settings
113   FINALIZE_SETTINGS
114 end
join_table_alias() click to toggle source

The alias for the first join table.

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

Many through many associations don’t have a reciprocal

    # File lib/sequel/plugins/many_through_many.rb
122 def reciprocal
123   nil
124 end
separate_query_per_table?() click to toggle source

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

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