This issue still exists with Hibernate version 4.2.15.Final. This is the code that we are using :
Criteria fetchDsceDerivedDataCriteria = sess.createCriteria(EnrichedDataBO.class);
fetchDsceDerivedDataCriteria.setProjection(projList) .add(Restrictions.eq(CECommonConstant.PROPERTY_STATUS ,CommonConstant.STATUS_READY_FOR_SUBMISSION)) // .addOrder(Order.asc(CommonConstant.PROPERTY_PNEMONIC_NAME)) .setResultTransformer(Transformers.aliasToBean(TestBO.class));
fetchDsceDerivedDataCriteria.setLockMode(LockMode.PESSIMISTIC_WRITE);
return fetchDsceDerivedDataCriteria; Regards Ram
|