This project is archived and is in readonly mode.

#292 ✓ resolved
André Arko

Add has_many :primary_key option

Reported by André Arko | June 1st, 2008 @ 05:09 PM

Has many associations currently force you to use the id of the owner object as the primary key for the association. This patch adds a :primary_key option to has_many that allows you to specify the name of the method that will return the primary key for the association. The new option is tested and documented as an option on the has_many method.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Tickets have moved to Github

The new ticket tracker is available at https://github.com/rails/rails/issues

Shared Ticket Bins

Pages