Author: amarkhel
Date: 2010-03-12 14:47:58 -0500 (Fri, 12 Mar 2010)
New Revision: 16570
Modified:
branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/modifiableModel/BaseModifiableHibernateDataModel.java
Log:
RF-8466
Modified:
branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/modifiableModel/BaseModifiableHibernateDataModel.java
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/modifiableModel/BaseModifiableHibernateDataModel.java 2010-03-12
15:57:39 UTC (rev 16569)
+++
branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/modifiableModel/BaseModifiableHibernateDataModel.java 2010-03-12
19:47:58 UTC (rev 16570)
@@ -146,7 +146,9 @@
Criteria criteria = createCriteria();
appendFilters(FacesContext.getCurrentInstance(), criteria);
criteria.setProjection(Projections.rowCount());
- return ((Integer)criteria.list().get(0)).intValue();
+ //There are cast to Number object, related to
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3497.
+ //Such kind of implementation should work undependent on what Hibernate library version
used.
+ return ((Number)criteria.list().get(0)).intValue();
}
@Override