File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes Map-valued collections in HQL queries Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Map-valued collections in HQL queries" Watch "Map-valued collections in HQL queries" New topic

Map-valued collections in HQL queries

Alex Gr�nholm

Joined: May 15, 2008
Posts: 1

The above HQL query does not work, because Hibernate fails to connect the "cat" alias in the GROUP BY clause to the one being selected.
According to the Hibernate manual, it should be possible to give a function result an alias. However, Hibernate does not translate it to its proper value in the native SQL query.
What am I doing wrong?

The PurchaseInvoice class has:
I agree. Here's the link:
subject: Map-valued collections in HQL queries
It's not a secret anymore!