JAP1.0移植到JAP2.0时 其中涉及到Date,TimeStamp的需要在相关field上面添加@Temporal(TemporalType.DATE)
@Temporal(TemporalType.DATE)
@Column(name = "TO_LSP_DATE", length = 7)
public Date getToLspDate() {
return this.toLspDate;
}
public void setToLspDate(Date toLspDate) {
this.toLspDate = toLspDate;
}
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
public enum TemporalType {
DATE, //java.sql.Date
TIME, //java.sql.Time
TIMESTAMP //java.sql.Timestamp
}