Sha256: 661004eee07200f60d80734fef762099384b28d8357054e3bf9cff5c574016c0
Contents?: true
Size: 580 Bytes
Versions: 11
Compression:
Stored size: 580 Bytes
Contents
module ActiveRecord module Reflection class AbstractReflection def build_join_constraint(table, foreign_table) key = join_keys.key foreign_key = join_keys.foreign_key # CPK #constraint = table[key].eq(foreign_table[foreign_key]) constraint = cpk_join_predicate(table, key, foreign_table, foreign_key) if klass.finder_needs_type_condition? table.create_and([constraint, klass.send(:type_condition, table)]) else constraint end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems