$members = Model_Member::query()->related('topics')->related('topics.articles')->get()
Jelmer Schreuder wrote on Friday 3rd of February 2012:You'd create the query like this:
$members = Model_Member::query()->related('topics')->related('topics.articles')->get()
I do have one warning though: this has the potential to run out of memory very quickly: let's say you have n members, which each have m topics and those each have o articles. In this case you'd get n * m * o rows returned that need to be parsed into objects, this has the potential to become huge.
It looks like you're new here. If you want to get involved, click one of these buttons!