Hibernate OptimisticLocking not working
I am using Hibernate 3.6.6 with Sping 3.0.4 After adding
@org.hibernate.annotations.Entity(optimisticLock=OptimisticLockType.ALL, dynamicUpdate=true)
to my bean and running following testcase
SSNConceptDAO conceptDao = (SSNConceptDAO)Context.getBean("conceptDAO");
SSNConcept ssnConcept = conceptDao.findById(9000000612l);
ssnConcept.setEditornote("Editor Note at "+System.currentTimeMillis());
conceptDao.update(ssnConcept);
Hibernate D开发者_Go百科on't add proper WHERE Clause to the update statement
However in an other application I am only using Hibernate without Spring, same settings are working perfectly alright.
精彩评论