@@ -1171,7 +1172,19 @@ This would generate a query which contains a `LEFT OUTER JOIN` whereas the `join
...
@@ -1171,7 +1172,19 @@ This would generate a query which contains a `LEFT OUTER JOIN` whereas the `join
If there was no `where` condition, this would generate the normal set of two queries.
If there was no `where` condition, this would generate the normal set of two queries.
If, in the case of this `includes` query, there were no comments for any articles, all the articles would still be loaded. By using `joins` (an INNER JOIN), the join conditions **must** match, otherwise no records will be returned.
NOTE: Using `where` like this will only work when you pass it a Hash. For
SQL-fragments you need use `references` to force joined tables: