Without knowing what your domain objects look like, I would try something like:
Code:
String stmt = "select new EventInstance(c.competitionName, r.roundName, e.eventDate)"
+ " from TbCompetition as c"
+ " left join fetch c.rounds as r"
+ " left join fetch r.events as e"
+ " where c.competitionId = :competitionId";
...
Query q = session.createQuery(stmt);
List l = query.setLong("competitionId", id).list();
where:
Code:
public class EventInstance {
...
public EventInstance(String competitionName, String roundName, Date eventDate) {
...
}
...
}
Greetings
///Odd Möller