Exercise 3: Demonstrating the Fixed-Depth Limitation — Possible Solution ==================================================================== SETUP ------------------------------ Six real, nested pages stored: Level 1: Programming (no parent) Level 2: General-Purpose Languages (parent: Level 1) Level 3: Java (parent: Level 2) Level 4: Fundamentals (parent: Level 3) Level 5: Chapter 1 (parent: Level 4) Level 6: Section A (parent: Level 5) RUNNING THE CHAPTER'S OWN QUERY ON Level 6 ------------------------------ db.query.pages.findFirst({ where: eq(pages.id, level6Id), with: { parent: { with: { parent: { with: { parent: { with: { parent: true } } } } } } } }); RESULT ------------------------------ The nested with clause only reaches four levels deep from Level 6, so the result stops at Level 3 (Java) - the deepest parent's own parent field comes back undefined/null, even though Level 2 (General-Purpose Languages) and Level 1 (Programming) genuinely exist further up the real chain. Flattening this result produces an incomplete breadcrumb, missing its own top two levels. WHY THIS WORKS AS AN ANSWER ------------------------------ It correctly builds a tree deep enough to exceed the chapter's own four-level nested with clause, and correctly shows the query returning a truncated ancestor chain - concrete, observable proof of the same fixed-depth limitation already established across every other ORM in this series.