Jaime Bellmyer
2009-Feb-26 17:27 UTC
[PATCH] Primary key on HABTM join table now raises an exception
Hello all. Most of us have created a habtm relationship at some point, and forgotten to remove the default primary key from the join table. It works at first, tests usually pass, but eventually you get cryptic duplicate primary key errors from the database. My fix raises an exception any time you try to create a habtm association. It rails right away, loudly, and with a clear message letting you know what you''ve done wrong. I''d really appreciate reviews and feedback. Here''s the ticket: http://rails.lighthouseapp.com/projects/8994/tickets/2086 Thanks, Jaime --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---