Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Composite Primary Keys support for Active Record

Fetching latest commit…

Cannot retrieve the latest commit at this time

= Composite Primary Keys for ActiveRecords

== Summary

ActiveRecords/Rails famously doesn't support composite primary keys. 
This RubyGem extends the activerecord gem to provide CPK support.

== Installation

    gem install composite_primary_keys
== Usage
    require 'composite_primary_keys'
    class ProductVariation
      set_primary_keys :product_id, :variation_seq
    pv = ProductVariation.find(345, 12)
It even supports composite foreign keys for associations.

See for more.

== Running Tests

See test/README.tests.txt

== Url

== Questions, Discussion and Contributions

== Author

Written by Dr Nic Williams, drnicwilliams@gmail.
Contributions by many!

Something went wrong with that request. Please try again.