This project is archived and is in readonly mode.

#806 ✓invalid
sam ginko

Include field ignored in Rails 2.1.0

Reported by sam ginko | August 12th, 2008 @ 01:40 PM | in 2.x

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) + ""

Comments and changes to this ticket

  • Tarmo Tänav

    Tarmo Tänav September 18th, 2008 @ 05:16 AM

    • 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.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages