I’m reverse engineering a PostgreSQL database that has columns of type “timestamp”. These columns generate code such as:
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "last_update", nullable = false, length = 29)
public Timestamp getLastUpdate() {
return this.lastUpdate;
}
However, it seems that reading or writing to these columns internally translates to a java.sql.Date somewhere as the time portion of the field is lost.
If I manually remove the @Temporal tag the code works as expected.
This is a Java 6, Hibernate backed environment running against Postgres 8.3. MyEclipse says it is Version 7.0, build id 7.0-20081201.
Any thoughts?