Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tests of composite_primary_keys Rails plugin, for discussion at http://www.ruby-forum.com/topic/195472 .
Ruby JavaScript
branch: no_index_nil_k…

This branch is 2 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
config
db
public
script
test
.gitignore
README
Rakefile

README

My description from http://www.ruby-forum.com/topic/195472:

I created a sample app testing composite_primary_keys, which is up on Github at http://github.com/marnen/cpk_sample if you want to play around with it.  The app uses one table (entries) with three integer fields (alpha, beta, gamma) and no id field.  There are several branches:

* no_index_nil_keys -- no index on DB table, Entry.set_primary_keys nil. Doesn't work.

* no_index_all_keys -- no index on DB table, Entry.set_primary_keys :alpha, :beta, :gamma. Works for reading and writing (that is, Entry.create and Entry.all both work as expected).

* all_index_all_keys -- primary key(alpha beta gamma) on DB table, Entry.set_primary_keys :alpha, :beta, :gamma.  Works for reading and writing.

I think you were getting the error in a no_index_all_keys situation, and I cannot reproduce that error.  I'm using Mac OS X 10.6.1, Ruby 1.8.7, Rails 2.3.4, composite_primary_keys 2.3.2, and PostgreSQL 8.4.1.  Let me know if you get different results with my code...
Something went wrong with that request. Please try again.