| The re-factored upload contains precisely the same mappings as my test case and the actual test case is identical except rather than using EntityManager directly the engineer decided to involve spring-data's repository abstraction. If using Spring / Spring-Data is the only difference and that is what the engineer needed to introduce in order to make the test case fail, why report the problem to Hibernate? The only significant difference I see is the engineer's test case calls some method JpaRepository#saveAndFlush. To me that should be equivalent to changing my test cases to include a call to entityManager#flush() after the persist call, which I tested against 5.2.9.Final with no failure. Is the only way your engineer can reproduce the problem is to introduce Spring? Given that the test case I attached works fine with pure Hibernate, I'm inclined to question if this is a Hibernate bug in the first place without more detail. A stack trace or some more details would go a long way here. |