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

Public Instance methods

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

[Source]

    # File lib/sequel/plugins/many_through_many.rb, line 37
37:         def associated_key_table
38:           self[:associated_key_table] = self[:final_reverse_edge][:alias]
39:         end

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

[Source]

    # File lib/sequel/plugins/many_through_many.rb, line 43
43:         def default_associated_key_alias
44:           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
45:         end

The list of joins to use when eager graphing

[Source]

    # File lib/sequel/plugins/many_through_many.rb, line 48
48:         def edges
49:           self[:edges] || calculate_edges || self[:edges]
50:         end

Many through many associations don‘t have a reciprocal

[Source]

    # File lib/sequel/plugins/many_through_many.rb, line 53
53:         def reciprocal
54:           nil
55:         end

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

[Source]

    # File lib/sequel/plugins/many_through_many.rb, line 58
58:         def reverse_edges
59:           self[:reverse_edges] || calculate_edges || self[:reverse_edges]
60:         end

[Validate]