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.

### Methods

associated_key_table default_associated_key_alias edges reciprocal reverse_edges

### Public Instance methods

associated_key_table()

The table containing the column to use for the associated key when eagerly loading

[Source]

        # File lib/sequel/plugins/many_through_many.rb, line 51
    51:         def associated_key_table
    52:           self[:associated_key_table] = self[:final_reverse_edge][:alias]
    53:         end

default_associated_key_alias()

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

[Source]

        # File lib/sequel/plugins/many_through_many.rb, line 57
    57:         def default_associated_key_alias
    58:           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
    59:         end

edges()

The list of joins to use when eager graphing

[Source]

        # File lib/sequel/plugins/many_through_many.rb, line 62
    62:         def edges
    63:           self[:edges] || calculate_edges || self[:edges]
    64:         end

reciprocal()

Many through many associations don‘t have a reciprocal

[Source]

        # File lib/sequel/plugins/many_through_many.rb, line 67
    67:         def reciprocal
    68:           nil
    69:         end

reverse_edges()

The list of joins to use when lazy loading or eager loading

[Source]

        # File lib/sequel/plugins/many_through_many.rb, line 72
    72:         def reverse_edges
    73:           self[:reverse_edges] || calculate_edges || self[:reverse_edges]
    74:         end

[Validate]