drnic/composite_primary_keys — pull request #145 by tbeauvais (2013-01-07 00:11:42+00:00)
Title: Need to patch AR HasManyAssociation foreign_key_present? method to work with array of keys

The ActiveRecord HasManyAssociation foreign_key_present? method needs to be patched to work with a CPK compound key array. Currently this method falsely indicates that a value for the foreign_key exists, which can lead to AR generating unnecessary SELECT statements. The statement generated contain WHERE clause looking for CPK values of NULL (e.g. group_id = NULL).