I'm using:
Eclipselink 2.5.0
HSQLDB 2.3
JPA 2.1
Spring 4.0.5
I have this entity:
@Entity
public class MyEntity {
...
@Temporal(TemporalType.DATE)
@Convert(converter = MyLocalDateTimeConverter.class)
private LocalDate date;
}
When the HSQLDB/Eclipselink generate the DDL, it generates the dabase field as:
TIMESTAMP
When I access (via select) this entity, my converter get a java.sql.Timestamp
instead of java.sql.Date
and converts the value to a LocalDateTime
instead of LocalDate
.
How can I force to generate the field as:
DATE // respecting the Temporal definition