1 = Composite Primary Keys for ActiveRecords
5 ActiveRecords/Rails famously doesn't support composite primary keys.
6 This RubyGem extends the activerecord gem to provide CPK support.
10 gem install composite_primary_keys
14 require 'composite_primary_keys'
15 class ProductVariation
16 set_primary_keys :product_id, :variation_seq
19 pv = ProductVariation.find(345, 12)
21 It even supports composite foreign keys for associations.
23 See http://compositekeys.rubyforge.org for more.
27 See test/README.tests.txt
31 http://compositekeys.rubyforge.org
33 == Questions, Discussion and Contributions
35 http://groups.google.com/compositekeys
39 Written by Dr Nic Williams, drnicwilliams@gmail
40 Contributions by many!