-->
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: Hibernate 3.2 aggregation function change
PostPosted: Tue Nov 07, 2006 10:18 am 
Newbie

Joined: Tue Nov 07, 2006 10:01 am
Posts: 1
Hi everyone,

Hibernate3.2 Migration Guide http://www.hibernate.org/250.html#A42
mentions "Changed aggregation (count, sum, avg) function return types".

To use the classic pre Hibernate 3.2 aggregation functions, the following help is given:

----
If you cannot change to the JPA compliant type handling the following code can be used to provide "classic" Hibernate behavior for HQL aggregation.

Configuration classicCfg = new Configuration();
classicCfg.addSqlFunction( "count", new ClassicCountFunction());
classicCfg.addSqlFunction( "avg", new ClassicAvgFunction());
classicCfg.addSqlFunction( "sum", new ClassicSumFunction());
SessionFactory classicSf = classicCfg.buildSessionFactory();
----

Is something like this also possible in declarative instead of programmatic configuration?

My Hibernate configuration is deployed in a jboss via a har archive, and i donĀ“t know, how to switch to the old aggregation functions there.

Thanks for your help.

Markus


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 07, 2006 11:18 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
add it in a subclass of your dialect

_________________
Max
Don't forget to rate


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.