class Book(models.Model):
# fields
class Chapter(models.Model):
book = models.ForeignKey(Book)
class Page(models.Model):
chapter = models.ForeignKey(Chapter)
I want all the pages of the book A, possibly without cycling every chapter to fetch the pages.
book = Book.objects.get(pk=1)
pages = book.chapter_set.page_set #?!?