-->
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.  [ 3 posts ] 
Author Message
 Post subject: count(*) result Long/Integer
PostPosted: Mon Aug 13, 2007 5:55 am 
Regular
Regular

Joined: Thu Sep 04, 2003 10:43 am
Posts: 61
Hibernate version:
hibernate-3.2.5


We are developing a big applications (about 1000 tables in the db) with Hibernate and we are using Hibernate 3.1.0

I've just download and install Hibernate 3.2.5 GA and I've seen that the class of the result of a query like "SELECT COUNT(*) FROM ..." is changed.

Version 3.1.0 was Integer
Version 3.2.5 is Long

Is there a way to keep the old behaviuor? By some configuration properties or something like this ... (I suppose that if this exists it should be the default)

If not ... the words backward compatibility means nothing for you?
I know that the change in the code is simple for making it work, for each single COUNT(*), but ... we have hundreds of COUNT(*) ... hidden in millions of lines of java code, developed by 20 or more person.

Regards
Alessandro


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 13, 2007 6:18 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
This change aligned Hibernate with the Java Persistence specification. It has also been mentioned in release notes and the migration guide. You have several options:

- don't upgrade
- change your code
- change the Hibernate code (it is open source)

The option you do not have is flaming people here.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 13, 2007 6:25 am 
Regular
Regular

Joined: Thu Sep 04, 2003 10:43 am
Posts: 61
christian wrote:
This change aligned Hibernate with the Java Persistence specification. It has also been mentioned in release notes and the migration guide. You have several options:

- don't upgrade
- change your code
- change the Hibernate code (it is open source)

The option you do not have is flaming people here.



I don't want to flam no-one, but I think that when you make a change (even if for align to some specification) you should support old behaviour, if this do not cost so much.
I think that it was very simple to keep it with some configuration property ... I know I can change Hibernate code, but I need 1 week at least to find out where and how, while for the developer who changed it, it was a matter of 2/3 minutes to add this support. This is just a suggestion for the next time, not take as a flame to anyone of the group.

By the way, thank you very much for you answer, now I know what to do.

Regards
Alessandro


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