Displaying 1 result from an estimated 1 matches for "straight_join".
2007 Dec 09
0
straight join in rails
Maybe someone will find this useful:
I have a relatively complex (My)SQL query that results from having many
many :conditions and :includes, and MySQL seems to apply a wrong join
order so I wanted to force an order using the STRAIGHT_JOIN statement,
but rails doesn''t really let you do it. Having to construct this query
manually (there are 4 joins) and still have a right format for eager
association loading wasn''t really an option.
I digged into ActiveRecord and modifying the JoinDependency class to
output "ST...