Migration Concerns for move from Hibernate 3.3 to 3.5
List of migration concerns as users migrate from 3.3 to 3.5: Hibernate properties configured as type="text" now map to JDBC LONGVARCHAR; in pre-3.5 versions, text properties were mapped to JDBC CLOB. A new Hibernate type, materialized_clob, was added to map Java String properties to JDBC CLOB. If an application has properties configured as type="text" that are intended to be mapped to JDBC CLOB, then they should be changed to type="materialized_clob" in hbm mapping files, or, if using annotations, @Type(type = "text") should be replaced by @Lob. Numeric aggregate Criteria projections now return the same value type as their HQL counterparts. As a result, the return type from the following projections in org.hibernate.criterion have changed: "count" and "count distinct" projections now return a Long value (due to changes in CountProjection, Projections.rowCount(), Projections.count( propertyName ), and Projections.countDistinct( propertyName )). "sum" projections return a value type that depends on the property type due to changes in Projections.sum( propertyName ): for properties mapped as Long, Short, Integer, or primitive integer types, a Long value is returned; for properties mapped as Float, Double, or primitive floating point types, a Double value is returned. Failing to adapt application code to these changes will cause: java.lang.ClassCastException