This project is archived and is in readonly mode.
Disconnect between :table_name_with_underscore option and primary key singularization
Reported by Brian Takita | February 25th, 2009 @ 02:16 AM | in 2.x
The :table_name_with_underscore primary_key_prefix_type option implies that AR should be using [table_name]_id as the primary key. However, it seems to be trying to use the singularized table_name instead.
Example: table: people expected primary_id: people_id AR primary_id: person_id
Comments and changes to this ticket
-
CancelProfileIsBroken August 5th, 2009 @ 02:58 PM
- Tag set to bugmash
-
Rajesh August 8th, 2009 @ 11:36 PM
-1 Using singularized name makes much more sense here. If the table name is topics, then the id is better called topic_id instead of topics_id
Please close this ticket.
-
John Pignata August 9th, 2009 @ 02:39 AM
-1 the singularized form makes more sense. "prefix_type" would imply a singular name.
-
CancelProfileIsBroken August 9th, 2009 @ 03:09 AM
- Tag cleared.
- State changed from new to wontfix
Agreed. The option name might be a bit misleading, but the behavior is good and it's not worth breaking compatability to rename.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>