Group by: list if no aggregate function is specified



In a query like SELECT parent, children FROM Parent parent LEFT JOIN p.children children GROUP BY parent maybe it would be good if it will return a list of Object[2], where the second object is a list of children of a parent. Because creating a query to get a list of parents, then fetching children list for each parent - not a good idea.

Thank you.


You may use JOIN FETCH for this purpose.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Post Reply

To post a reply and/or subscribe to update notifications - please login