-
Notifications
You must be signed in to change notification settings - Fork 42
Description
Hello,
we have an application where we use optimisting locking like this:
@typedefs({ @typedef(name = "dateTime", defaultForType = org.joda.time.DateTime.class, typeClass = org.jadira.usertype.dateandtime.joda.PersistentDateTime.class) })
@column(name = "LAST_UPDATE")
@Version
private DateTime lastUpdate;
This worked perfectly fine until we recently upgraded our application to newer version - including jadira to 7.0.0.CR1.
Since then we get a class cast exception for above definition:
java.lang.ClassCastException: class org.jadira.usertype.dateandtime.joda.PersistentDateTime cannot be cast to class org.hibernate.usertype.UserVersionType
Having a look at the source code of jadira it seems there was a change in the class hierarchy for PersistentDateTime class from AbstractVersionableUserType to AbstractParameterizedTemporalUserType which causes this error. At least with our versions.
The versions used are:
- jadira: 7.0.0.CR1
- Hibernate: 5.4
Any ideas how to solve this? For now we are trying to go back to version 6.0.1.GA of Jadira.
Thx
Markus