The Order.lastUpdate persistent property, which is of type java.util.Date, is mapped to the PERSISTENCE_ORDER_ORDER.LASTUPDATE database field, which is of the SQL type TIMESTAMP. To ensure the proper mapping between these types, you must use the @Temporal annotation with the proper temporal type specified in @Temporal’s element. @Temporal’s elements are of type javax.persistence.TemporalType. The possible values are
DATE, which maps to java.sql.Date
TIME, which maps to java.sql.Time
TIMESTAMP, which maps to java.sql.Timestamp
Here is the relevant section of Order:
@Temporal(TIMESTAMP) public Date getLastUpdate() { return lastUpdate; }