Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
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

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
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