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.

Include field ignored in Rails 2.1.0

#806

I just realized that the include field is completely ignored in the 2.1.0 version. I need to use a function that creates an array loops through the columns in the table to find the search strings and apparently it's not working with this new version. Anyone with a work around? This is my query.

@furnii_from_furnii = Furni.find :all, :include =>[:raider, {:imageasset => :skin} ], :conditions => ""+Furni.conditions_by_like(@search)+" OR " +Raider.conditions_by_like(@search) + "OR" +Skin.conditions_by_like(@search) + ""

Reported by sam ginko · August 12th, 2008 @ 01:40 PM

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

Activity

  1. Tarmo Tänav
    Tarmo Tänav
    • State changed from new to invalid

    :include certainly should not be ignored, but it is possible that due to no conditions referencing any of the included tables the query is not executed as a join but instead as multiple selects (using the new "preload" strategy of eager loading). Either way this ticket provides too little information to work with, so closing it for now.

    September 18th, 2008 @ 05:16 AM