I've set up a database that has composite primary keys for Ruby on Rails. Creating the migration works, but when I start to seed the database, I still get a warning that "Active Record does not support primary keys." and that the "Composite primary key is ignored." even after I've installed the composite_primary_keys gem, and included require 'composite_primary_keys' into the environments.rb file.
Any thoughts as to why the composite primary key is still ignored?
Well, I found the work-around to this. For every model that I had that has composite primary keys, I included require 'composite_primary_keys' on the start of the class. Seems to work for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With