Sathish
Sathish

Reputation: 21080

How do i make ActiveRecord work on Tables with multiple columns as Primary keys?

How do i use ActiveRecord on existing DB with multiple columns as primary key and no ID column? I had to write extensions/hacks on set_primary_key, update and delete methods. But im not sure if it'll work on future versions. Is there a way to make ActiveRecord work in such cases without hacks?

Upvotes: 0

Views: 1950

Answers (1)

Dave Ray
Dave Ray

Reputation: 40005

ActiveRecord doesn't support composite primary keys. Here is a library that purports to add support though.

Upvotes: 1

Related Questions