I have a class which contains:
@Column(name = "end_date")
private Date endDate;
and its setter
public void setEndDate() {
endDate = new java.sql.Date(Calendar.getInstance().getTime().getTime());
System.out.println(endDate);
}
When I'm calling the setter, and check again if the value is correct, everything's fine.(even getEndDate().getClass() ).
However, when I'm saving my object into PostgreSQL (myObject.persist()), there's no value on END_TIME column. Other values are correct.
Does anyone know what's the problem?
Also, I have to mention that hibernate is set to create SQL tables
Setter and getter:
public void setEndDate(Date endDate) {
setEndDate();
}
public Date getEndDate() {
return endDate;
}
end_date. If the column isend_time, the annotation does not match.