Patch composite_primary_keys to work around issue when one component of

a composite key is called "id".
This commit is contained in:
Tom Hughes 2009-05-08 17:56:12 +00:00
parent a69f380fa5
commit 3a0f4d30cf

View file

@ -114,7 +114,7 @@ module CompositePrimaryKeys
id_map = {}
records.each do |record|
key = primary_key_name.map{|k| record.send(k)}
key = primary_key_name.map{|k| record.attributes[k]}
key_as_string = key.join(CompositePrimaryKeys::ID_SEP)
if key_as_string