Say I have 3 entities Grandparent
, Parent
, and Child
.
Grandparent - Parent
is a one to many relationship
Parent - Child
is a many to one relationship
Child
has an age
attribute
My goal is to get all Child
entities of Parent
where Parent.grandparent
is a certain Grandparent
. In addition, I'd like to sort the fetched results by age
. I know I can do this in multiple steps, but my question is: how can I accomplish this in a single fetch request?
Edit: Perhaps this diagram will be a bit clearer than the description above.