I just want to know how to do this...
I have entity class and I added version attribute for represent tables 'version' field like this..
Code:
private int version;
@Version
@Column(name="VERSION", nullable=true, length=10)
public int getVersion() {
return version;
}
public void setVersion(int version) {
this.version = version;
}
I have table field named 'VERSION' in my oracle database. its type is number and default value is 0.
The problem is this doesn't work. Should I do anything else apart from this ?