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.

make association preloading use = instead of IN for single records

#1013

i noticed that rails sometimes hits the db twice for the same single record like so:


SELECT * FROM `sites` WHERE (`sites`.`id` IN (1))
SELECT * FROM `sites` WHERE (`sites`.`id` = 1)

this patch fixes this.

Reported by RSL · September 10th, 2008 @ 07:29 PM

State: committed
Milestone: 2.1.2
Assigned to: nobody
Importance: High

Activity

  1. Jeremy Kemper
    Jeremy Kemper
    • State changed from new to open
    • Milestone changed from 2.x to 2.1.2

    September 10th, 2008 @ 10:10 PM

  2. Repository
    Repository
    • State changed from open to committed

    (from [ba342c2c96999d207012140b34f95fc553b3d447]) fixed association preloading to use = instead of IN when there's only one record

    [#1013 state:committed]

    Signed-off-by: Jeremy Kemper jeremy@bitsweat.net http://github.com/rails/rails/co...

    September 10th, 2008 @ 10:14 PM

  3. Repository
    Repository

    (from [6ce13429cbc1359d85e1dc99c84561840e89d455]) fixed association preloading to use = instead of IN when there's only one record

    [#1013 state:committed]

    Signed-off-by: Jeremy Kemper jeremy@bitsweat.net http://github.com/rails/rails/co...

    September 10th, 2008 @ 10:14 PM