Okay, I got the failing test:
@Test public void test() { EntityManager entityManager = entityManagerFactory.createEntityManager(); entityManager.merge( new MyEntity( 1L, new MyRecord( "test", "d" ) ) ); entityManager.getTransaction().commit(); entityManager.close(); }
merging a non-transient entity fails.