| I attached a bug testcase for easy reproducibility. Instructions:
- unzip the file
- cd
HHH-13413 Open
- mvn spring-boot:run
From another shell execute:
- curl -X POST localhost:8080/write/first
And verify the exception:
2019-07-05 17:51:19.821 ERROR 16627 — [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.orm.jpa.JpaSystemException: null id generated for:class com.example.demo.DetailObject; nested exception is org.hibernate.id.IdentifierGenerationException: null id generated for:class com.example.demo.DetailObject] with root cause
org.hibernate.id.IdentifierGenerationException: null id generated for:class com.example.demo.DetailObject
at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:121) ~[hibernate-core-5.4.3.Final.jar:5.4.3.Final]
at org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:192) ~[hibernate-core-5.4.3.Final.jar:5.4.3.Final]
|