Joined: Fri Jun 02, 2006 6:51 pm Posts: 1
|
I'm sorry if this post is a little on the obscure side, i'm a beginner to hibernate so please bare with me. I'm working with jboss on a booking system which has 3 entities which are stored in a mysql dbase.
I need to do an eager fetch using a query like
SELECT t from Tutor t LEFT JOIN FETCH t.appointments WHERE t.id = :bindId
however where this query selects all the tutor objects and eagerly fetches the appropriate appointment objects i need a query which selects Tutor objects and eagerly fetches both appointment and student objects.
The below query worked however it doubled the objects.
SELECT t from Tutor t LEFT JOIN FETCH t.appointments LEFT JOIN FETCH t.students WHERE t.id = :bindId
any help would be greatly appreciated. =]
|
|