-->
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.  [ 2 posts ] 
Author Message
 Post subject: Aggregate functions returns null array with list
PostPosted: Mon Apr 25, 2005 9:37 am 
Newbie

Joined: Mon Oct 04, 2004 10:54 am
Posts: 15
Hi, I'm using Hibernate version:3.01 and having some trouble with the aggregate functions such as max(). They seems to return an empty object array, if retrieved as list. Hibernate generates the propriate SQL and discover in fact one row. If retrieved as iterator, it work ok.

Query q = session.createQuery("select max(ue) ...");
UeBean ueBean = (UeBean)q.list().get(0);

the code above will cause a ClassCastException even though the data exists. q.iterate() works fine.

Thanks


Top
 Profile  
 
 Post subject: Re: Aggregate functions returns null array with list
PostPosted: Tue Apr 26, 2005 4:05 am 
Newbie

Joined: Tue Apr 26, 2005 3:48 am
Posts: 1
I have noticed the same problem, but only when using the new ANTLR query parser, works fine with the classic parser.

Is there any solution to this?


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

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.