Joined: Thu Feb 03, 2011 12:56 pm Posts: 1
|
Hi all,
I was wondering if it was possible in a single native SQL query to load some entities and the associated childs.
For example: sqlQuery = "select parents.* from ParentTable parents inner join ChildTable childs on parents.id = childs.parent_id"; Query query = getHibernateSession().createSQLQuery(sqlQuery).addEntity(ParentEntity.class);
And I want to have the childs of each parent already filled in. Is it possible? What must I add to achieve this?
Thanks in advance!
Jim
|
|