Hibernate version: 2
can you use hsql to "select" and "group by" without specifying all of the fields in the select and the group by? i have to retrieve 280 fields from three tables/objects (mapped many-to-one, many-to-one, many-to-one).... specifying all the fields explicitly, i get a huge sql statement which is bombing in db2...
e.g.:
select obj1.obj2.obj3.lotsoffields (...), obj1.obj2.lotsoffields (...) from Object1 obj1
group by obj1.obj2.obj3.lotsoffields (...), obj1.obj2.lotsoffields (...)
i tried something like:
select obj1.obj2.obj3, obj1.obj2 from Object1 obj1
group by obj1.obj2.obj3, obj1.obj2
...but using show_sql=true i get only the PK's in the group by, and all the fields in the select -- sql error.
thank you!
tom
|