|
Affects version is 4.3.0.Final - just couldn't pick it.
A field is declared like this:
@Column(...)
@Convert(converter=DateToLongConverter.class)
private Date creationDate;
The converter used looks like this:
@Converter
public class DateToLongConverter implements AttributeConverter<Date, Long> {
@Override
public Long convertToDatabaseColumn(Date val) {
if (val != null) {
return val.getTime();
}
return null;
}
@Override
public Date convertToEntityAttribute(Long val) {
if (val != null) {
return new Date(val);
}
return null;
}
}
Now the problem is that internally, Hibernate tries to read the column as Temporal type, which fails - at least on Oracle.
|