diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/annotations/mapsid/Client.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/annotations/mapsid/Client.java index 23b29ce5b1..7ad2965915 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/annotations/mapsid/Client.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/annotations/mapsid/Client.java @@ -95,11 +95,11 @@ public void persistMX1Test1() throws Exception { final DID1bDependent dep2 = new DID1bDependent(new DID1bDependentId("Michelle", 1L), employee1); final DID1bDependent dep3 = new DID1bDependent(new DID1bDependentId("John", 2L), employee2); + em.persist(employee1); + em.persist(employee2); em.persist(dep1); em.persist(dep2); em.persist(dep3); - em.persist(employee1); - em.persist(employee2); logger.log(Logger.Level.TRACE, "persisted Employees and Dependents"); em.flush(); diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/derivedid/ex1a/Client.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/derivedid/ex1a/Client.java index 12f7f8017f..cddba8d2ce 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/derivedid/ex1a/Client.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/derivedid/ex1a/Client.java @@ -80,11 +80,11 @@ public void DIDTest() throws Exception { final DID1Dependent dep2 = new DID1Dependent("Michelle", employee1); final DID1Dependent dep3 = new DID1Dependent("John", employee2); + getEntityManager().persist(employee1); + getEntityManager().persist(employee2); getEntityManager().persist(dep1); getEntityManager().persist(dep2); getEntityManager().persist(dep3); - getEntityManager().persist(employee1); - getEntityManager().persist(employee2); logger.log(Logger.Level.TRACE, "persisted Employees and Dependents"); getEntityManager().flush(); diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/derivedid/ex1b/Client.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/derivedid/ex1b/Client.java index 2a4b21b06c..7da9e49451 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/derivedid/ex1b/Client.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/derivedid/ex1b/Client.java @@ -83,11 +83,11 @@ public void DIDTest() throws Exception { final DID1bDependent dep2 = new DID1bDependent(depId2, employee1); final DID1bDependent dep3 = new DID1bDependent(depId3, employee2); + getEntityManager().persist(employee1); + getEntityManager().persist(employee2); getEntityManager().persist(dep1); getEntityManager().persist(dep2); getEntityManager().persist(dep3); - getEntityManager().persist(employee1); - getEntityManager().persist(employee2); logger.log(Logger.Level.TRACE, "persisted Employees and Dependents"); getEntityManager().flush(); diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/derivedid/ex2b/Client.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/derivedid/ex2b/Client.java index ed42deb850..0625998ee1 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/derivedid/ex2b/Client.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/derivedid/ex2b/Client.java @@ -82,12 +82,12 @@ public void DIDTest() throws Exception { final DID2bDependent dep2 = new DID2bDependent(new DID2bDependentId("Michelle", eId1), employee1); final DID2bDependent dep3 = new DID2bDependent(new DID2bDependentId("John", eId2), employee2); + getEntityManager().persist(employee1); + getEntityManager().persist(employee2); getEntityManager().persist(dep1); getEntityManager().persist(dep2); getEntityManager().persist(dep3); - getEntityManager().persist(employee1); - getEntityManager().persist(employee2); getEntityManager().flush(); logger.log(Logger.Level.TRACE, "persisted Employees and Dependents"); diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/derivedid/ex3a/Client.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/derivedid/ex3a/Client.java index 98987409ed..388ad9744d 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/derivedid/ex3a/Client.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/derivedid/ex3a/Client.java @@ -86,13 +86,12 @@ public void DIDTest() throws Exception { final DID3Dependent dep2 = new DID3Dependent(depId2, employee1); final DID3Dependent dep3 = new DID3Dependent(depId3, employee2); + getEntityManager().persist(employee1); + getEntityManager().persist(employee2); getEntityManager().persist(dep1); getEntityManager().persist(dep2); getEntityManager().persist(dep3); - getEntityManager().persist(employee1); - getEntityManager().persist(employee2); - getEntityManager().flush(); logger.log(Logger.Level.TRACE, "persisted Employees and Dependents"); diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/derivedid/ex3b/Client.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/derivedid/ex3b/Client.java index 7d2f63b0db..2ebc6321ba 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/derivedid/ex3b/Client.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/derivedid/ex3b/Client.java @@ -87,13 +87,12 @@ public void DIDTest() throws Exception { final DID3bDependent dep2 = new DID3bDependent(depId2, employee1); final DID3bDependent dep3 = new DID3bDependent(depId3, employee2); + getEntityManager().persist(employee1); + getEntityManager().persist(employee2); getEntityManager().persist(dep1); getEntityManager().persist(dep2); getEntityManager().persist(dep3); - getEntityManager().persist(employee1); - getEntityManager().persist(employee2); - logger.log(Logger.Level.TRACE, "persisted Employees and Dependents"); getEntityManager().flush();