Grails 3 - return list in query result from HQL query
问题 I have a domain object: class Business { String name List subUnits static hasMany = [ subUnits : SubUnit, ] } I want to get name and subUnits using HQL, but I get an error Exception: org.springframework.orm.hibernate4.HibernateQueryException: not an entity when using: List businesses = Business.executeQuery("select business.name, business.subUnits from Business as business") Is there a way I can get subUnits returned in the result query result as a List using HQL? When I use a left join, the