I just upgraded to rails 2.3.5 and a find statement with some eager loading that was working perfectly before, suddenly stopped working.
Advertisement.find :all, :include => [{:user => :contact}, {:apartment => {:building => :address}}], :conditions => [query_info[1]], :order => query_info[0]
This is the error I get
Mysql::Error: Unknown column 'company_id' in 'where clause': SELECT * FROM `advertisements` WHERE (company_id = 10 AND on_market = 1)
The reason the column isn't found is because none of the tables that I want included, have been included? As far as I know the syntax for the find statement is still correct in the newest version of rails, so what gives?