Kedar Joshi It would be useful to see your mapping because it sounds like you are using `GenerationTtpe= AUTO` which defaults to using a SEQUENCE, while you are using IDENTITY on the DB side. Did you really map the entity identifier like this?
@Id
@GeneratedValue(strategy = IDENTITY)
private Long id;
Also, you should know that using IDENTITY will prevent Hibernate from batching inserts at flush-time. You are better off using the SEQUENCE generator, as explained in this article. |