drnic/composite_primary_keys — pull request #147 by krbullock (2013-01-17 22:07:57+00:00)
Title: Allow auto_increment columns to be part of composite key (MySQL only for now)

As I posted in , creating a composite key that has an auto-increment field as part of it doesn't work as expected. Here's a patch that fixes this on MySQL, with a test case. It's a one-line monkeypatch of ActiveRecord::Persistence#create to assign to self[:id] instead of self.id.

If this line of development is interesting, I can look into fixing it on PostgreSQL and SQLite3 as well.