Hi,
I've got some information in a new table I'm adding to my system. (I'm not a database person, so forgive my lack of correct terminology.) I was expecting to access the table via fields other than the id field (contribution_id, user_id and/or ip_address), but never by id, so I didn't create the table with the id field (":id => false" in my create_table call.
Anyway, it seemed to work find for creating records. But when I went to modify an object and save it, I got the following error:
Mysql::Error: #42S22Unknown column 'id' in 'where clause': UPDATE ratings SET `contribution_id` = 27, `user_id` = NULL, `rate_good` = 0, `ip_address` = '127.0.0.1' WHERE id = NULL
Now if I change my table definition to have an id field (ie, get rid of the ":id => false" clause), everything seems to work fine.
Does this sound like a bug, or user-error? If the latter, what am I misunderstanding and what is the fix?
Thanks, Brad