import com.acme.domain.*def sessionFactorysessionFactory = ctx.sessionFactory // this only necessary if your are working with the Grails console/shelldef session = sessionFactory.currentSessiondef query = session.createSQLQuery("select f.* from Foo where f.id = :filter)) order by f.name");query.addEntity(com.acme.domain.Foo.class); // this defines the result type of the queryquery.setInteger("filter", 88);query.list()*.name;


