]> git.openstreetmap.org Git - rails.git/blob - vendor/gems/composite_primary_keys-2.2.2/README.txt
11daeb922b9cac520208a96c5ed19b7dbb71c3dc
[rails.git] / vendor / gems / composite_primary_keys-2.2.2 / README.txt
1 = Composite Primary Keys for ActiveRecords\r
2 \r
3 == Summary\r
4 \r
5 ActiveRecords/Rails famously doesn't support composite primary keys. \r
6 This RubyGem extends the activerecord gem to provide CPK support.\r
7 \r
8 == Installation\r
9 \r
10     gem install composite_primary_keys\r
11     \r
12 == Usage\r
13   \r
14     require 'composite_primary_keys'\r
15     class ProductVariation\r
16       set_primary_keys :product_id, :variation_seq\r
17     end\r
18     \r
19     pv = ProductVariation.find(345, 12)\r
20     \r
21 It even supports composite foreign keys for associations.\r
22 \r
23 See http://compositekeys.rubyforge.org for more.\r
24 \r
25 == Running Tests\r
26 \r
27 See test/README.tests.txt\r
28 \r
29 == Url\r
30 \r
31 http://compositekeys.rubyforge.org\r
32 \r
33 == Questions, Discussion and Contributions\r
34 \r
35 http://groups.google.com/compositekeys\r
36 \r
37 == Author\r
38 \r
39 Written by Dr Nic Williams, drnicwilliams@gmail\r
40 Contributions by many!\r
41 \r