Sha256: 57ed73939766f78ab449b3ec625f08be0f5d33a5204cc224205a109ffa2f26c6
Contents?: true
Size: 622 Bytes
Versions: 34
Compression:
Stored size: 622 Bytes
Contents
module ActiveRecord module Associations class JoinDependency class JoinAssociation def build_constraint(reflection, table, key, foreign_table, foreign_key) # CPK # constraint = table[key].eq(foreign_table[foreign_key]) constraint = cpk_join_predicate(table, key, foreign_table, foreign_key) if reflection.klass.finder_needs_type_condition? constraint = table.create_and([ constraint, reflection.klass.send(:type_condition, table) ]) end constraint end end end end end
Version data entries
34 entries across 34 versions & 1 rubygems