Can I use INNER JOIN or simply JOIN without writing raw SQL;
:include generates LEFT OUTER JOIN statement
Or the only way is to use :joins => “INNER JOIN …”?
Thanks
Can I use INNER JOIN or simply JOIN without writing raw SQL;
:include generates LEFT OUTER JOIN statement
Or the only way is to use :joins => “INNER JOIN …”?
Thanks
Dmitry H. wrote:
Can I use INNER JOIN or simply JOIN without writing raw SQL;
:include generates LEFT OUTER JOIN statement
Or the only way is to use :joins => “INNER JOIN …”?
The find() method takes a :joins option. Pass in a string with the join
you want to use. Example here:
http://blog.hasmanythrough.com/articles/2006/06/12/when-associations-arent-enough-part-2
–
Josh S.
http://blog.hasmanythrough.com
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs