I have entity with @Version on an Instant column.
I attach Entity through @OneToOne(cascade=persist) relationship (relation column in 2nd entity).
When I flush hibernate does insert and update x set where id=? and modified=? and i get
org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1;
There are no other threads/applications accessing database.
Please share a test case(hibernate-test-case-templates/JPAUnitTestCase.java at main · hibernate/hibernate-test-case-templates · GitHub) that reproduces the issue.