-->
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.  [ 5 posts ] 
Author Message
 Post subject: HQL: does count(t) result in Int32 or Int64
PostPosted: Sun Nov 12, 2006 11:03 am 
Beginner
Beginner

Joined: Mon Mar 20, 2006 7:59 am
Posts: 30
Hello,

there is another issue that seems to be changed from Beta1 to Beta2: when I use in an HQL query the construct "count(t)" the result is an Int64 while "count(*)" results in an Int32. Is that intended?

Why don't they both result in an Int64? I couldn't find the appropriate location in the source.

Regards,
Dominik


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 13, 2006 3:17 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
In Beta2 the type of count(...) depends on the argument. I'll fix the default to be Int64.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 13, 2006 4:41 am 
Beginner
Beginner

Joined: Mon Mar 20, 2006 7:59 am
Posts: 30
Okay, good to know that. I am sure that without this information I would have search quite a time for the errors in my code ;-)

Another issue in Beta2: When your mapping file has the wrong namespace: i.e. 2.0 and you query with a criterion, you don't receive a "mapping wrong" exception, but an "AssertionFailure: null id in entry (don't flush the Session after an exception occurs)]". It would have been nice if the exception told the user that there is something wrong with the mapping files.

But except of these issues beta2 seems to run flawlessly :-) Thanks for your great work, sergey!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 13, 2006 4:42 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
That one is a known issue that I have decided not to fix.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 13, 2006 4:54 am 
Beginner
Beginner

Joined: Mon Mar 20, 2006 7:59 am
Posts: 30
Okay, a can understand this decision quite well, as this isn't a show stopper and there are certainly a lot of much more important issues.

Anyway thanks again for your great work!!!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.