org.hibernate.PropertyValueException: Detached entity with generated id
Issue
- After updating to
EAP 7.4 Update 13,hibernateis throwing error while inserting new record. Same code was working inEAP 7.4 Update 12
table A has B_ID reference column
table B has ID column
a record is inserted to table B
then we insert a record to table A referencing the ID of the new record in table B using column B_ID
then we get a failure on null VERSION on table B
javax.persistence.PersistenceException: org.hibernate.PropertyValueException: Detached entity with generated id '123456' has an uninitialized version value 'null'
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 7.4 Update 13
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.