I'm trying to setup hibernate in my new project and I have this problem. I'm using oracle database.
In some tables I have more than one column that are timestamp.
Hibernate maps this columns as Serializable.
I tried to change manually to LocalTime type but the project won't even run. I change both on Availability.java and Availability.hbm.xml.
Is it supposed to be Serializable? I would like to use LocalTime instead. Is there a way to do this?
I found this: How to map oracle timestamp to appropriate java type in hibernate?. But it was 5 years ago and it seems like a complicated solution..
public class Availability implements java.io.Serializable {
private int id;
private Teacher teacher;
private byte month;
private short year;
private Serializable initialhour;
private Serializable endhour;
private String weekday;
public void setInitialhour(Serializable initialhour) {
this.initialhour = initialhour;
}
public Serializable getEndhour() {
return this.endhour;
}
}