Solution:-
In the hibernate entity class we have to define genertion type strategy of id column. For example we have id column as autoincremented in sql table that will define in hibernate entity class as below:-
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(name="id")
private int id;
I hope your error will be solve.
Happy Coding
In the hibernate entity class we have to define genertion type strategy of id column. For example we have id column as autoincremented in sql table that will define in hibernate entity class as below:-
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(name="id")
private int id;
I hope your error will be solve.
Happy Coding
No comments:
Post a Comment