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.

Join tables referenced by :group when eager loading

#1428

For the rewrite of eager loading for 2.1, checks were put in place to join association tables in the old manner if they were referenced by :select, :order or :conditions. For some reason, :group was left out. Here is a patch to address this.

Reported by James Le Cuirot · November 21st, 2008 @ 04:19 PM

State: invalid
Milestone: 2.x
Assigned to: Frederick Cheung Frederick Cheung
Importance: none

Activity

  1. James Le Cuirot
    James Le Cuirot

    Here's a patch against 2.1 for anyone that needs it.

    November 21st, 2008 @ 04:20 PM

  2. Pratik
    Pratik
    • Assigned user set to Frederick Cheung

    March 8th, 2009 @ 12:11 AM

  3. Gabe da Silveira
    Gabe da Silveira
    • Tag changed from 2.1, eager_loading, edge, group, include, join, patch to 2.1, bugmash, eager_loading, edge, group, include, join, patch

    Tagging this one bugmash since Pratik suggested it to me (he knows how much I love these eager loading issues).

    August 9th, 2009 @ 06:27 AM

  4. Gabe da Silveira
    Gabe da Silveira
    • Tag changed from 2.1, bugmash, eager_loading, edge, group, include, join, patch to 2.1, bugmash, eager_loading, edge, group, include, join, patch, verified

    verified the test case against 2-3-stable. I rebased the patch, and it fixed the problem for mysql, but raised two different errors in sqlite and pgsql. This is a deeper problem, but I think the initial patch is correct, just need to identify the underlying issues. Here is my rebased version on 2-3 which passes for mysql but fails for sqlite and postgres. I'll pick this up later if no one else does.

    I've attached a patch.

    August 9th, 2009 @ 07:29 AM

  5. James Le Cuirot
    James Le Cuirot

    I realised shortly after posting this that I didn't actually need it and I could approach the problem in a better way. I've forgotten the details though. I doubt many people would need this to be fixed but it could be worth doing just for completeness.

    August 9th, 2009 @ 10:36 AM

  6. Rizwan Reza
    Rizwan Reza
    • State changed from new to invalid
    • Tag changed from 2.1, bugmash, eager_loading, edge, group, include, join, patch, verified to 2.1, eager_loading, edge, group, include, join, patch, verified

    January 20th, 2010 @ 11:02 AM