Hibernate have option to check concurrent modification of a same data. Which will be easy when we add a version column in the table and hibernate entity.
If existing row has version as NULL then hibernate will throw the NullPointerException while updating the existing data.
To avoid this exception @version column should be NOT NULL and should have a default value. if it number 1.
If existing row has version as NULL then hibernate will throw the NullPointerException while updating the existing data.
To avoid this exception @version column should be NOT NULL and should have a default value. if it number 1.
Comments
Post a Comment