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.

[TEST] Inverse of doesn't work when associations eager load other associations

#6684

Using includes when loading an association that has an inverse_of causes the inverse_of not to work.

p = Project.find(1)
pi = p.project_items
pi[0].project # Doesn't perform a query

p = Project.find(1)
pi = p.project_items.includes(:image)
pi[0].project # Performs a query

I've attached a failing test case for Rails master.

Reported by Ryan Wallace · April 7th, 2011 @ 08:06 PM

State: duplicate
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Ryan Wallace
    Ryan Wallace
    • State changed from new to duplicate

    Never mind. This is a duplicate of #4914. [state:duplicate]

    April 7th, 2011 @ 08:46 PM