Hi , i am having a Date field which needs to be updated with current time stamp whenever any update is invoked on the row.
Its not for version control as i am handling this with another field.Its just that user needs to be aware of last update time.
so my code is somewhat like
Code:
@Version @Column( name="obj_version",nullable=false )
private int version = 0;
@Temporal( TemporalType.TIMESTAMP )
@Column( columnDefinition="Timestamp default sysdate", nullable=false )
@org.hibernate.annotations.Generated(org.hibernate.annotations.GenerationTime.ALWAYS)
private Date update_date;
this is not working ,update date is only generated at the time of insert but no further updates.
So update_date only shows creation date.
Thanks for any help.