Why do I get
Caused by: org.hibernate.MappingException: Could not instantiate id generator [entity-name=hw11.model.domain.Client]?
Here is class Client here the class in which an error
My code was like that:
...
@Id
@Column(name = "ID")
@SequenceGenerator(name = "stu_seq", sequenceName = "STUDENT_SEQ", allocationSize = 10)
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "stu_seq")
private int id;
...
I just set the allocationSize
as 1 and solved the problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With