-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Using Map as return type in HQL
PostPosted: Mon Sep 17, 2007 11:19 am 
Newbie

Joined: Thu Sep 13, 2007 3:55 pm
Posts: 1
Location: Florida
Hello,

I was going through hibenate documentation and found that it is possible to return map from HQL by using code:

select new map( max(bodyWeight) as max, min(bodyWeight) as min, count(*) as n )
from Cat cat


But I am not able to understand when I execute query how to get map and use alias for retrieving each column.

The method for getting results are either query.list of query.iterate.
Which function to call if I need to get result as map and how to retrieve each column from map using alias.

Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.