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.

Multiple self-referencing eager loads don't join properly

#4679

This is from #4463 JoinAssociation#aliased_table_name_for bug affecting AR find_with_associations? -- decided it's probably better to create a new ticket than submit a fix to an already committed ticket. I made a small, silly error in the previously committed patch, checking is_a? instead of class equality. Since JoinAssociation inherits from JoinBase, this can cause a stashed association join to be grafted onto the JoinBase instead of a JoinAssociation in the edge case of multiple-self-joining eager loads. Patch with test included. Sorry about that!

Reported by Ernie Miller · May 24th, 2010 @ 01:33 PM

State: committed
Milestone: none
Assigned to: Pratik Pratik
Importance: none

Activity

  1. Ernie Miller
    Ernie Miller
    • Tag changed from joindependency, rails3 to joindependency, patch, rails3, tests

    May 24th, 2010 @ 02:18 PM

  2. Ernie Miller
    Ernie Miller
    • Assigned user set to Pratik

    Pratik, sorry for sending this your way but I don't want to see Rails 3 release with this silly bug :)

    June 8th, 2010 @ 12:33 AM

  3. Repository
    Repository
    • State changed from new to committed

    (from [a4eaa1fd39f93eff975bfd8a5cc4c7dfc3f18aa7]) Fix multiple self-referencing eager loads failing to join multiple times

    [#4679 Multiple self-referencing eager loads don't join properly state:committed]

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

    June 8th, 2010 @ 06:02 AM