Hi.
We are trying to get optimistic concurrency setup on a project that use JSF, Spring and Hibernate. We've added a version field (INTEGER) to our database table, and added these annotations to the persistance object (the BO layer):
@Version
@Column(name="version", nullable=true, length=10)
protected Integer version;
(Using the typical BO->BL->VO->Managed Bean architecture.)
But for some reason, the version field does not increment when editing and saving the record. It's always null. I have to figure it out if I want to handle the exception and send a feedback to our application's users.
Can anyone help me out with this?
Before responding, please keep in mind we are using Spring as the persistance mapping. That means we have no <class> tag. They are <bean> tags that do not have the same attributes than Hibernate's.
Thanks
Hugo
|