Exercise 3: The Fixed-Depth Limitation, Shared Across Three ORMs — Possible Solution ==================================================================== WHY THE NESTED includes() CALL HAS A REAL LIMITATION ------------------------------ Per this chapter, includes(parent: { parent: { parent: { parent: :parent } } }) pre-loads exactly the number of levels written into the nested hash - five in this example - and no more. A page one level deeper than what was written would still trigger one additional, unbatched query beyond what was pre-loaded, since the eager-load instruction has to state its own depth explicitly rather than expressing "however deep the chain actually goes." THE TWO SIBLING ORMS THAT SHARE THIS SAME LIMITATION ------------------------------ Per this chapter, Eloquent's own nested with('parent.parent.parent.parent') and Django's own nested select_related('parent__parent__parent__parent') both require the exact same kind of fixed-depth chain written out in advance, sharing the identical limitation for a self-referencing, arbitrary-depth tree. WHY THIS WORKS AS AN ANSWER ------------------------------ It correctly explains that a nested includes() call only pre-loads the specific depth written into it, and correctly names Eloquent's with() and Django's select_related as sharing the identical fixed-depth limitation, rather than presenting it as a shortcoming unique to Rails.