Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Disconnect between :table_name_with_underscore option and primary key singularization

#2065

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

Reported by Brian Takita · February 25th, 2009 @ 02:16 AM

State: wontfix
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. CancelProfileIsBroken
  2. Rajesh
    Rajesh

    -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.

    August 8th, 2009 @ 11:36 PM

  3. John Pignata
    John Pignata

    -1 the singularized form makes more sense. "prefix_type" would imply a singular name.

    August 9th, 2009 @ 02:39 AM

  4. CancelProfileIsBroken
    CancelProfileIsBroken
    • 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.

    August 9th, 2009 @ 03:09 AM