I have the persist class Stantion with some fields.
And then I do a simple query like
list = session.find("from Stantion");
it works fine and return me all my objects.
But if I add a timestamp for versioning:
Stantion.java:
Code:
...
Timestamp changeTime;
/**
* @hibernate.timestamp column="change_time"
*/
public Timestamp getChangeTime() {
return changeTime;
}
public void setChangeTime(Timestamp changeTime) {
this.changeTime = changeTime;
}
...
in Stantion.hbm.xml:
Code:
...
<timestamp name="changeTime" column="change_time"/>
...
this query return me just the first object and null for others
If I call
session.find("from Stantion") again I get the first and the second objects in the list and null for others, and so on...
I tried to query it from Hibern8Ide with the same results.
And there is no difference between using java.sql.Timestamp or java.util.Date for timestamp property.
What is wrong?