File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Map-valued collections in HQL queries" Watch "Map-valued collections in HQL queries" New topic
Author

Map-valued collections in HQL queries

Alex Gr�nholm
Greenhorn

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: http://aspose.com/file-tools
 
subject: Map-valued collections in HQL queries