Multi level asociations

Andrei Teodorescu wrote:

How can I do this further on, but with a larger number of tables (say A
has many Bs that has many Cs that has many Ds etc...)?

If the result is something like a sql table view, why not make it a real
database view, and just hook up a model. In a recent app, I did just
that since the user wanted to see data from across 5 tables in one view.
A sql view with a model hooked to it solved the issue nicely, and I
create the view exactly as I wanted it, and off load all the heavy
joining logic to the database itself.

If you go that way, have a look at