I have a page tree. I would like to get all the subpages of the page. In this case, I added fetch: Eager to my yaml file. I also want to order subpages by their position. But fetch seems to ruin everything. It reduces the number of executed queries, but the subpages are no longer sorted by their position.
This part is inside my yaml file for the Page object:
oneToMany: pages: targetEntity: Page mappedBy: parentPage fetch: EAGER orderBy: { position: ASC }
Any idea how to get all the pages of the page, but still arrange the position? The page tree can be nested more than 1 level.
- page_1 page_1_1 page_1_2 page_1_2_1 page_1_2_2 - page_2
source share