Java Hibernate Criteria Average: BigDecimal instead of Double -


hibernate criteria mapping projections.avg("column") double.

how can force hibernate map function bigdecimal?

hibernate hibernate-core-4.1.9.final.jar

should possible subclass avgprojection override gettypes return bigdecimal , use projection instead.

i.e.

public class avgbdprojection extends avgprojection{      public avgbdprojection(string propertyname) {         super(propertyname);     }      public type[] gettypes(criteria criteria, criteriaquery criteriaquery)     throws hibernateexception {         return new type[] { org.hibernate.type.bigdecimaltype.instance };    } } 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -