Book :has_many Pages :has_many Illustrations
==== ===== =============
2 certain pages have NO illustrations
3 the following 2 cases:
A) Book.find(:all,
:joins => [:pages => [:illustrations]])
B) Book.find(:all,
:include => [:pages => [:illustrations]])
Question: Is it correct that:
- in case A), the books containing pages WITHOUT any illustrations will
NOT show up in the results
- whereas in case B), these books WILL show up?
(Personally, I thought that the main difference between :joins and
:include was the "eager loading" part.)
Question: Is it correct that:
- in case A), the books containing pages WITHOUT any illustrations will
NOT show up in the results
- whereas in case B), these books WILL show up?
(Personally, I thought that the main difference between :joins and
:include was the "eager loading" part.)
:joins does an inner join, :include doesn't (and may not even do a
join at all)