JPA - Access Type

[Updated: Apr 7, 2017, Created: Apr 6, 2017]

In this tutorial, we will understand how JPA provider runtime accesses our entities to persist/load it; whether the access is via fields or via properties (getters/setters). We will also learn; how to customize this behavior by using @Access annotation.

Default field access example

If we place persistence annotations (@Id, @Column etc) on the fields rather than on getters/setters, then JPA provider will access the entity via fields.

In following examples we are going to print stack-trace of getters/setters to analyze; how JPA runtime accesses our entities.

@Entity
public class MyEntity1 {

  @Id
  private long myId;
  private String myStr;

  public MyEntity1() {
      Util.printCallChain(this);
  }

  public long getMyId() {
      Util.printCallChain(this);
      return myId;
  }

  public void setMyId(long myId) {
      Util.printCallChain(this);
      this.myId = myId;
  }

  public String getMyStr() {
      Util.printCallChain(this);
      return myStr;
  }

  public void setMyStr(String myStr) {
      Util.printCallChain(this);
      this.myStr = myStr;
  }
}
public class Util {

  public static <T> T readEntity(Class<T> entityClass, Object identity, EntityManagerFactory emf) {
      System.out.printf("-- Loading entity %s%n", entityClass.getSimpleName());
      EntityManager em = emf.createEntityManager();
      T t = em.find(entityClass, identity);
      System.out.printf("-- Entity loaded: %s%n", toObjectStr(t));
      return t;
  }

  public static void persistEntity(Object entity, EntityManagerFactory emf) throws Exception {
      EntityManager em = emf.createEntityManager();
      em.getTransaction().begin();
      System.out.println("-- Persisting " + entity.getClass().getSimpleName());
      em.persist(entity);
      System.out.println("-- Entity persisted");
      em.getTransaction().commit();
      System.out.println("-- after committing");
  }

  public static void printCallChain(Object o) {
      List<StackTraceElement> st = Arrays.asList(Thread.currentThread().getStackTrace());
      String callChain = "";
      for (int i = 2; i < st.size(); i++) {
          callChain += getStackTraceElementString(st.get(i)) + "<";
      }
      System.out.printf("Instance: %s, call-stack: %s%n", toObjectStr(o), callChain);
  }

  private static String getStackTraceElementString(StackTraceElement ste) {
      return String.format("%s.%s[%s]", getSimpleClassName(ste.getClassName()),
              ste.getMethodName(), ste.getLineNumber());
  }

  private static String getSimpleClassName(String className) {
      int i = className.lastIndexOf(".");
      if (i != -1) {
          return className.substring(i + 1);
      }
      return className;
  }

  public static String toObjectStr(Object object) {
      return object.getClass().getSimpleName() + "@" + System.identityHashCode(object);
  }
}
public class ExampleMain1 {

  public static void main(String[] args) throws Exception {
      EntityManagerFactory emf = Persistence.createEntityManagerFactory("test1");
      MyEntity1 entity1 = createEntity();
      Util.persistEntity(entity1, emf);
      Util.readEntity(MyEntity1.class, 1L, emf);
  }

  private static MyEntity1 createEntity() {
      System.out.println("-- Creating an entity instance ");
      MyEntity1 myEntity = new MyEntity1();
      myEntity.setMyId(1L);
      myEntity.setMyStr("testStr");
      System.out.println("-- Entity created: " + Util.toObjectStr(myEntity));
      return myEntity;
  }
}

Output

Instance: MyEntity1@1544044024, call-stack: MyEntity1.<init>[14]<NativeConstructorAccessorImpl.newInstance0[-2]<NativeConstructorAccessorImpl.newInstance[62]<DelegatingConstructorAccessorImpl.newInstance[45]<Constructor.newInstance[423]<InstantiationPolicy.buildNewInstanceUsingDefaultConstructor[134]<InstantiationPolicy.buildNewInstance[105]<ClassDescriptor.selfValidationAfterInitialization[4230]<ClassDescriptor.validateAfterInitialization[6099]<ClassDescriptor.postInitialize[3915]<DatabaseSessionImpl.initializeDescriptors[706]<DatabaseSessionImpl.initializeDescriptors[651]<DatabaseSessionImpl.initializeDescriptors[582]<DatabaseSessionImpl.postConnectDatasource[818]<DatabaseSessionImpl.loginAndDetectDatasource[762]<EntityManagerFactoryProvider.login[265]<EntityManagerSetupImpl.deploy[731]<EntityManagerFactoryDelegate.getAbstractSession[205]<EntityManagerFactoryDelegate.getDatabaseSession[183]<EntityManagerFactoryImpl.getDatabaseSession[528]<PersistenceProvider.createEntityManagerFactoryImpl[150]<PersistenceProvider.createEntityManagerFactory[188]<Persistence.createEntityManagerFactory[79]<Persistence.createEntityManagerFactory[54]<ExampleMain1.main[9]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
-- Creating an entity instance
Instance: MyEntity1@368601527, call-stack: MyEntity1.<init>[14]<ExampleMain1.createEntity[17]<ExampleMain1.main[10]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity1@368601527, call-stack: MyEntity1.setMyId[23]<ExampleMain1.createEntity[18]<ExampleMain1.main[10]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity1@368601527, call-stack: MyEntity1.setMyStr[33]<ExampleMain1.createEntity[19]<ExampleMain1.main[10]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
-- Entity created: MyEntity1@368601527
-- Persisting MyEntity1
Instance: MyEntity1@1495754791, call-stack: MyEntity1.<init>[14]<NativeConstructorAccessorImpl.newInstance0[-2]<NativeConstructorAccessorImpl.newInstance[62]<DelegatingConstructorAccessorImpl.newInstance[45]<Constructor.newInstance[423]<InstantiationPolicy.buildNewInstanceUsingDefaultConstructor[134]<InstantiationPolicy.buildNewInstance[105]<ObjectBuilder.buildNewInstance[660]<UnitOfWorkImpl.registerNotRegisteredNewObjectForPersist[4285]<RepeatableWriteUnitOfWork.registerNotRegisteredNewObjectForPersist[521]<UnitOfWorkImpl.registerNewObjectForPersist[4233]<EntityManagerImpl.persist[507]<Util.persistEntity[24]<ExampleMain1.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
-- Entity persisted
Instance: MyEntity1@1080511022, call-stack: MyEntity1.<init>[14]<NativeConstructorAccessorImpl.newInstance0[-2]<NativeConstructorAccessorImpl.newInstance[62]<DelegatingConstructorAccessorImpl.newInstance[45]<Constructor.newInstance[423]<InstantiationPolicy.buildNewInstanceUsingDefaultConstructor[134]<InstantiationPolicy.buildNewInstance[105]<ObjectBuilder.buildNewInstance[660]<InstantiationCopyPolicy.buildClone[31]<ObjectBuilder.instantiateClone[3991]<UnitOfWorkImpl.buildOriginal[592]<MergeManager.mergeChangesOfWorkingCopyIntoOriginal[806]<MergeManager.mergeChangesOfWorkingCopyIntoOriginal[705]<MergeManager.mergeChanges[309]<UnitOfWorkImpl.mergeChangesIntoParent[3280]<RepeatableWriteUnitOfWork.mergeChangesIntoParent[379]<RepeatableWriteUnitOfWork.commitRootUnitOfWork[291]<UnitOfWorkImpl.commitAndResume[1169]<EntityTransactionImpl.commit[134]<Util.persistEntity[26]<ExampleMain1.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity1@1608493520, call-stack: MyEntity1.<init>[14]<NativeConstructorAccessorImpl.newInstance0[-2]<NativeConstructorAccessorImpl.newInstance[62]<DelegatingConstructorAccessorImpl.newInstance[45]<Constructor.newInstance[423]<InstantiationPolicy.buildNewInstanceUsingDefaultConstructor[134]<InstantiationPolicy.buildNewInstance[105]<ObjectBuilder.buildNewInstance[660]<InstantiationCopyPolicy.buildClone[31]<ObjectBuilder.buildBackupClone[592]<DeferredChangeDetectionPolicy.buildBackupClone[227]<DeferredChangeDetectionPolicy.revertChanges[291]<UnitOfWorkImpl.resumeUnitOfWork[5279]<UnitOfWorkImpl.synchronizeAndResume[5228]<RepeatableWriteUnitOfWork.synchronizeAndResume[558]<UnitOfWorkImpl.commitAndResume[1176]<EntityTransactionImpl.commit[134]<Util.persistEntity[26]<ExampleMain1.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
-- after committing
-- Loading entity MyEntity1
Instance: MyEntity1@113739878, call-stack: MyEntity1.<init>[14]<NativeConstructorAccessorImpl.newInstance0[-2]<NativeConstructorAccessorImpl.newInstance[62]<DelegatingConstructorAccessorImpl.newInstance[45]<Constructor.newInstance[423]<InstantiationPolicy.buildNewInstanceUsingDefaultConstructor[134]<InstantiationPolicy.buildNewInstance[105]<ObjectBuilder.buildNewInstance[660]<InstantiationCopyPolicy.buildClone[31]<AbstractCopyPolicy.buildWorkingCopyClone[39]<ObjectBuilder.instantiateWorkingCopyClone[4013]<UnitOfWorkImpl.cloneAndRegisterObject[1007]<UnitOfWorkImpl.cloneAndRegisterObject[955]<UnitOfWorkIdentityMapAccessor.getAndCloneCacheKeyFromParent[209]<UnitOfWorkIdentityMapAccessor.getFromIdentityMap[137]<UnitOfWorkImpl.registerExistingObject[3940]<ObjectBuildingQuery.registerIndividualResult[448]<ReadObjectQuery.registerResultInUnitOfWork[897]<ObjectLevelReadQuery.checkEarlyReturn[890]<DatabaseQuery.execute[841]<ObjectLevelReadQuery.execute[1134]<ReadObjectQuery.execute[441]<ObjectLevelReadQuery.executeInUnitOfWork[1222]<UnitOfWorkImpl.internalExecuteQuery[2896]<AbstractSession.executeQuery[1857]<AbstractSession.executeQuery[1839]<AbstractSession.executeQuery[1790]<EntityManagerImpl.executeQuery[911]<EntityManagerImpl.findInternal[854]<EntityManagerImpl.find[730]<EntityManagerImpl.find[599]<Util.readEntity[15]<ExampleMain1.main[12]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity1@1806009701, call-stack: MyEntity1.<init>[14]<NativeConstructorAccessorImpl.newInstance0[-2]<NativeConstructorAccessorImpl.newInstance[62]<DelegatingConstructorAccessorImpl.newInstance[45]<Constructor.newInstance[423]<InstantiationPolicy.buildNewInstanceUsingDefaultConstructor[134]<InstantiationPolicy.buildNewInstance[105]<ObjectBuilder.buildNewInstance[660]<InstantiationCopyPolicy.buildClone[31]<ObjectBuilder.buildBackupClone[592]<DeferredChangeDetectionPolicy.buildBackupClone[227]<UnitOfWorkImpl.populateAndRegisterObject[3677]<UnitOfWorkImpl.cloneAndRegisterObject[1026]<UnitOfWorkImpl.cloneAndRegisterObject[955]<UnitOfWorkIdentityMapAccessor.getAndCloneCacheKeyFromParent[209]<UnitOfWorkIdentityMapAccessor.getFromIdentityMap[137]<UnitOfWorkImpl.registerExistingObject[3940]<ObjectBuildingQuery.registerIndividualResult[448]<ReadObjectQuery.registerResultInUnitOfWork[897]<ObjectLevelReadQuery.checkEarlyReturn[890]<DatabaseQuery.execute[841]<ObjectLevelReadQuery.execute[1134]<ReadObjectQuery.execute[441]<ObjectLevelReadQuery.executeInUnitOfWork[1222]<UnitOfWorkImpl.internalExecuteQuery[2896]<AbstractSession.executeQuery[1857]<AbstractSession.executeQuery[1839]<AbstractSession.executeQuery[1790]<EntityManagerImpl.executeQuery[911]<EntityManagerImpl.findInternal[854]<EntityManagerImpl.find[730]<EntityManagerImpl.find[599]<Util.readEntity[15]<ExampleMain1.main[12]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
-- Entity loaded: MyEntity1@113739878

In above output, no setters/getters were ever called, that means our entity was accessed via fields only.

Default property access example

@Entity
public class MyEntity2 {
  private long myId;
  private String myStr;

  public MyEntity2() {
      Util.printCallChain(this);
  }

  @Id
  public long getMyId() {
      Util.printCallChain(this);
      return myId;
  }

  public void setMyId(long myId) {
      Util.printCallChain(this);
      this.myId = myId;
  }

  public String getMyStr() {
      Util.printCallChain(this);
      return myStr;
  }

  public void setMyStr(String myStr) {
      Util.printCallChain(this);
      this.myStr = myStr;
  }
}
public class ExampleMain2 {

  public static void main(String[] args) throws Exception {
      EntityManagerFactory emf = Persistence.createEntityManagerFactory("test2");
      MyEntity2 entity = createEntity();
      Util.persistEntity(entity, emf);
      Util.readEntity(MyEntity2.class, 1L, emf);
  }

  private static MyEntity2 createEntity() {
      System.out.println("-- Creating an entity instance ");
      MyEntity2 myEntity = new MyEntity2();
      myEntity.setMyId(1L);
      myEntity.setMyStr("testStr");
      System.out.println("-- Entity created: " + Util.toObjectStr(myEntity));
      return myEntity;
  }
}

Output

Instance: MyEntity2@178530208, call-stack: MyEntity2.<init>[12]<NativeConstructorAccessorImpl.newInstance0[-2]<NativeConstructorAccessorImpl.newInstance[62]<DelegatingConstructorAccessorImpl.newInstance[45]<Constructor.newInstance[423]<InstantiationPolicy.buildNewInstanceUsingDefaultConstructor[134]<InstantiationPolicy.buildNewInstance[105]<ClassDescriptor.selfValidationAfterInitialization[4230]<ClassDescriptor.validateAfterInitialization[6099]<ClassDescriptor.postInitialize[3915]<DatabaseSessionImpl.initializeDescriptors[706]<DatabaseSessionImpl.initializeDescriptors[651]<DatabaseSessionImpl.initializeDescriptors[582]<DatabaseSessionImpl.postConnectDatasource[818]<DatabaseSessionImpl.loginAndDetectDatasource[762]<EntityManagerFactoryProvider.login[265]<EntityManagerSetupImpl.deploy[731]<EntityManagerFactoryDelegate.getAbstractSession[205]<EntityManagerFactoryDelegate.getDatabaseSession[183]<EntityManagerFactoryImpl.getDatabaseSession[528]<PersistenceProvider.createEntityManagerFactoryImpl[150]<PersistenceProvider.createEntityManagerFactory[188]<Persistence.createEntityManagerFactory[79]<Persistence.createEntityManagerFactory[54]<ExampleMain2.main[9]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
-- Creating an entity instance
Instance: MyEntity2@1636556778, call-stack: MyEntity2.<init>[12]<ExampleMain2.createEntity[17]<ExampleMain2.main[10]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity2@1636556778, call-stack: MyEntity2.setMyId[22]<ExampleMain2.createEntity[18]<ExampleMain2.main[10]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity2@1636556778, call-stack: MyEntity2.setMyStr[32]<ExampleMain2.createEntity[19]<ExampleMain2.main[10]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
-- Entity created: MyEntity2@1636556778
-- Persisting MyEntity2
Instance: MyEntity2@2012828581, call-stack: MyEntity2.<init>[12]<NativeConstructorAccessorImpl.newInstance0[-2]<NativeConstructorAccessorImpl.newInstance[62]<DelegatingConstructorAccessorImpl.newInstance[45]<Constructor.newInstance[423]<InstantiationPolicy.buildNewInstanceUsingDefaultConstructor[134]<InstantiationPolicy.buildNewInstance[105]<ObjectBuilder.buildNewInstance[660]<UnitOfWorkImpl.registerNotRegisteredNewObjectForPersist[4285]<RepeatableWriteUnitOfWork.registerNotRegisteredNewObjectForPersist[521]<UnitOfWorkImpl.registerNewObjectForPersist[4233]<EntityManagerImpl.persist[507]<Util.persistEntity[24]<ExampleMain2.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity2@1636556778, call-stack: MyEntity2.getMyId[17]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.getAttributeValueFromObject[82]<MethodAttributeAccessor.getAttributeValueFromObject[61]<DatabaseMapping.getAttributeValueFromObject[657]<AbstractDirectMapping.valueFromObject[1178]<ObjectBuilder.extractPrimaryKeyFromObject[3012]<UnitOfWorkImpl.registerNewObjectInIdentityMap[4328]<UnitOfWorkImpl.registerNewObjectClone[4302]<UnitOfWorkImpl.registerNotRegisteredNewObjectForPersist[4291]<RepeatableWriteUnitOfWork.registerNotRegisteredNewObjectForPersist[521]<UnitOfWorkImpl.registerNewObjectForPersist[4233]<EntityManagerImpl.persist[507]<Util.persistEntity[24]<ExampleMain2.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
-- Entity persisted
Instance: MyEntity2@1636556778, call-stack: MyEntity2.getMyId[17]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.getAttributeValueFromObject[82]<MethodAttributeAccessor.getAttributeValueFromObject[61]<DatabaseMapping.getAttributeValueFromObject[657]<AbstractDirectMapping.valueFromObject[1178]<ObjectBuilder.extractPrimaryKeyFromObject[3012]<ObjectBuilder.createObjectChangeSet[2873]<DeferredChangeDetectionPolicy.createObjectChangeSetThroughComparison[155]<DeferredChangeDetectionPolicy.createObjectChangeSet[146]<DeferredChangeDetectionPolicy.calculateChanges[91]<DeferredChangeDetectionPolicy.calculateChangesForNewObject[48]<UnitOfWorkImpl.calculateChanges[662]<UnitOfWorkImpl.commitToDatabaseWithChangeSet[1516]<RepeatableWriteUnitOfWork.commitRootUnitOfWork[278]<UnitOfWorkImpl.commitAndResume[1169]<EntityTransactionImpl.commit[134]<Util.persistEntity[26]<ExampleMain2.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity2@1636556778, call-stack: MyEntity2.getMyId[17]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.getAttributeValueFromObject[82]<MethodAttributeAccessor.getAttributeValueFromObject[61]<DatabaseMapping.getAttributeValueFromObject[657]<AbstractDirectMapping.writeFromObjectIntoRow[1291]<ObjectBuilder.buildRow[1567]<ObjectBuilder.buildRow[1555]<DatabaseQueryMechanism.insertObjectForWrite[451]<InsertObjectQuery.executeCommit[80]<InsertObjectQuery.executeCommitWithChangeSet[90]<DatabaseQueryMechanism.executeWriteWithChangeSet[301]<WriteObjectQuery.executeDatabaseQuery[58]<DatabaseQuery.execute[904]<DatabaseQuery.executeInUnitOfWork[803]<ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery[108]<ObjectLevelModifyQuery.executeInUnitOfWork[85]<UnitOfWorkImpl.internalExecuteQuery[2896]<AbstractSession.executeQuery[1857]<AbstractSession.executeQuery[1839]<AbstractSession.executeQuery[1790]<CommitManager.commitNewObjectsForClassWithChangeSet[227]<CommitManager.commitAllObjectsWithChangeSet[126]<AbstractSession.writeAllObjectsWithChangeSet[4264]<UnitOfWorkImpl.commitToDatabase[1441]<UnitOfWorkImpl.commitToDatabaseWithChangeSet[1531]<RepeatableWriteUnitOfWork.commitRootUnitOfWork[278]<UnitOfWorkImpl.commitAndResume[1169]<EntityTransactionImpl.commit[134]<Util.persistEntity[26]<ExampleMain2.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity2@1636556778, call-stack: MyEntity2.getMyStr[27]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.getAttributeValueFromObject[82]<MethodAttributeAccessor.getAttributeValueFromObject[61]<DatabaseMapping.getAttributeValueFromObject[657]<AbstractDirectMapping.writeFromObjectIntoRow[1291]<ObjectBuilder.buildRow[1567]<ObjectBuilder.buildRow[1555]<DatabaseQueryMechanism.insertObjectForWrite[451]<InsertObjectQuery.executeCommit[80]<InsertObjectQuery.executeCommitWithChangeSet[90]<DatabaseQueryMechanism.executeWriteWithChangeSet[301]<WriteObjectQuery.executeDatabaseQuery[58]<DatabaseQuery.execute[904]<DatabaseQuery.executeInUnitOfWork[803]<ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery[108]<ObjectLevelModifyQuery.executeInUnitOfWork[85]<UnitOfWorkImpl.internalExecuteQuery[2896]<AbstractSession.executeQuery[1857]<AbstractSession.executeQuery[1839]<AbstractSession.executeQuery[1790]<CommitManager.commitNewObjectsForClassWithChangeSet[227]<CommitManager.commitAllObjectsWithChangeSet[126]<AbstractSession.writeAllObjectsWithChangeSet[4264]<UnitOfWorkImpl.commitToDatabase[1441]<UnitOfWorkImpl.commitToDatabaseWithChangeSet[1531]<RepeatableWriteUnitOfWork.commitRootUnitOfWork[278]<UnitOfWorkImpl.commitAndResume[1169]<EntityTransactionImpl.commit[134]<Util.persistEntity[26]<ExampleMain2.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity2@1636556778, call-stack: MyEntity2.getMyId[17]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.getAttributeValueFromObject[82]<MethodAttributeAccessor.getAttributeValueFromObject[61]<DatabaseMapping.getAttributeValueFromObject[657]<AbstractDirectMapping.valueFromObject[1178]<ObjectBuilder.extractPrimaryKeyFromObject[3012]<ObjectBuilder.extractPrimaryKeyFromObject[2974]<DatabaseQueryMechanism.insertObjectForWrite[466]<InsertObjectQuery.executeCommit[80]<InsertObjectQuery.executeCommitWithChangeSet[90]<DatabaseQueryMechanism.executeWriteWithChangeSet[301]<WriteObjectQuery.executeDatabaseQuery[58]<DatabaseQuery.execute[904]<DatabaseQuery.executeInUnitOfWork[803]<ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery[108]<ObjectLevelModifyQuery.executeInUnitOfWork[85]<UnitOfWorkImpl.internalExecuteQuery[2896]<AbstractSession.executeQuery[1857]<AbstractSession.executeQuery[1839]<AbstractSession.executeQuery[1790]<CommitManager.commitNewObjectsForClassWithChangeSet[227]<CommitManager.commitAllObjectsWithChangeSet[126]<AbstractSession.writeAllObjectsWithChangeSet[4264]<UnitOfWorkImpl.commitToDatabase[1441]<UnitOfWorkImpl.commitToDatabaseWithChangeSet[1531]<RepeatableWriteUnitOfWork.commitRootUnitOfWork[278]<UnitOfWorkImpl.commitAndResume[1169]<EntityTransactionImpl.commit[134]<Util.persistEntity[26]<ExampleMain2.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity2@1642676698, call-stack: MyEntity2.<init>[12]<NativeConstructorAccessorImpl.newInstance0[-2]<NativeConstructorAccessorImpl.newInstance[62]<DelegatingConstructorAccessorImpl.newInstance[45]<Constructor.newInstance[423]<InstantiationPolicy.buildNewInstanceUsingDefaultConstructor[134]<InstantiationPolicy.buildNewInstance[105]<ObjectBuilder.buildNewInstance[660]<InstantiationCopyPolicy.buildClone[31]<ObjectBuilder.instantiateClone[3991]<UnitOfWorkImpl.buildOriginal[592]<MergeManager.mergeChangesOfWorkingCopyIntoOriginal[806]<MergeManager.mergeChangesOfWorkingCopyIntoOriginal[705]<MergeManager.mergeChanges[309]<UnitOfWorkImpl.mergeChangesIntoParent[3280]<RepeatableWriteUnitOfWork.mergeChangesIntoParent[379]<RepeatableWriteUnitOfWork.commitRootUnitOfWork[291]<UnitOfWorkImpl.commitAndResume[1169]<EntityTransactionImpl.commit[134]<Util.persistEntity[26]<ExampleMain2.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity2@1636556778, call-stack: MyEntity2.getMyId[17]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.getAttributeValueFromObject[82]<MethodAttributeAccessor.getAttributeValueFromObject[61]<DatabaseMapping.getAttributeValueFromObject[657]<AbstractDirectMapping.mergeIntoObject[1042]<ObjectBuilder.mergeIntoObject[4136]<ObjectBuilder.mergeChangesIntoObject[4069]<MergeManager.mergeChangesOfWorkingCopyIntoOriginal[846]<MergeManager.mergeChangesOfWorkingCopyIntoOriginal[705]<MergeManager.mergeChanges[309]<UnitOfWorkImpl.mergeChangesIntoParent[3280]<RepeatableWriteUnitOfWork.mergeChangesIntoParent[379]<RepeatableWriteUnitOfWork.commitRootUnitOfWork[291]<UnitOfWorkImpl.commitAndResume[1169]<EntityTransactionImpl.commit[134]<Util.persistEntity[26]<ExampleMain2.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity2@1642676698, call-stack: MyEntity2.setMyId[22]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.setAttributeValueInObject[247]<MethodAttributeAccessor.setAttributeValueInObject[226]<DatabaseMapping.setAttributeValueInObject[1652]<AbstractDirectMapping.mergeIntoObject[1042]<ObjectBuilder.mergeIntoObject[4136]<ObjectBuilder.mergeChangesIntoObject[4069]<MergeManager.mergeChangesOfWorkingCopyIntoOriginal[846]<MergeManager.mergeChangesOfWorkingCopyIntoOriginal[705]<MergeManager.mergeChanges[309]<UnitOfWorkImpl.mergeChangesIntoParent[3280]<RepeatableWriteUnitOfWork.mergeChangesIntoParent[379]<RepeatableWriteUnitOfWork.commitRootUnitOfWork[291]<UnitOfWorkImpl.commitAndResume[1169]<EntityTransactionImpl.commit[134]<Util.persistEntity[26]<ExampleMain2.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity2@1636556778, call-stack: MyEntity2.getMyStr[27]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.getAttributeValueFromObject[82]<MethodAttributeAccessor.getAttributeValueFromObject[61]<DatabaseMapping.getAttributeValueFromObject[657]<AbstractDirectMapping.mergeIntoObject[1042]<ObjectBuilder.mergeIntoObject[4136]<ObjectBuilder.mergeChangesIntoObject[4069]<MergeManager.mergeChangesOfWorkingCopyIntoOriginal[846]<MergeManager.mergeChangesOfWorkingCopyIntoOriginal[705]<MergeManager.mergeChanges[309]<UnitOfWorkImpl.mergeChangesIntoParent[3280]<RepeatableWriteUnitOfWork.mergeChangesIntoParent[379]<RepeatableWriteUnitOfWork.commitRootUnitOfWork[291]<UnitOfWorkImpl.commitAndResume[1169]<EntityTransactionImpl.commit[134]<Util.persistEntity[26]<ExampleMain2.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity2@1642676698, call-stack: MyEntity2.setMyStr[32]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.setAttributeValueInObject[247]<MethodAttributeAccessor.setAttributeValueInObject[226]<DatabaseMapping.setAttributeValueInObject[1652]<AbstractDirectMapping.mergeIntoObject[1042]<ObjectBuilder.mergeIntoObject[4136]<ObjectBuilder.mergeChangesIntoObject[4069]<MergeManager.mergeChangesOfWorkingCopyIntoOriginal[846]<MergeManager.mergeChangesOfWorkingCopyIntoOriginal[705]<MergeManager.mergeChanges[309]<UnitOfWorkImpl.mergeChangesIntoParent[3280]<RepeatableWriteUnitOfWork.mergeChangesIntoParent[379]<RepeatableWriteUnitOfWork.commitRootUnitOfWork[291]<UnitOfWorkImpl.commitAndResume[1169]<EntityTransactionImpl.commit[134]<Util.persistEntity[26]<ExampleMain2.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity2@1887661178, call-stack: MyEntity2.<init>[12]<NativeConstructorAccessorImpl.newInstance0[-2]<NativeConstructorAccessorImpl.newInstance[62]<DelegatingConstructorAccessorImpl.newInstance[45]<Constructor.newInstance[423]<InstantiationPolicy.buildNewInstanceUsingDefaultConstructor[134]<InstantiationPolicy.buildNewInstance[105]<ObjectBuilder.buildNewInstance[660]<InstantiationCopyPolicy.buildClone[31]<ObjectBuilder.buildBackupClone[592]<DeferredChangeDetectionPolicy.buildBackupClone[227]<DeferredChangeDetectionPolicy.revertChanges[291]<UnitOfWorkImpl.resumeUnitOfWork[5279]<UnitOfWorkImpl.synchronizeAndResume[5228]<RepeatableWriteUnitOfWork.synchronizeAndResume[558]<UnitOfWorkImpl.commitAndResume[1176]<EntityTransactionImpl.commit[134]<Util.persistEntity[26]<ExampleMain2.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity2@1636556778, call-stack: MyEntity2.getMyId[17]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.getAttributeValueFromObject[82]<MethodAttributeAccessor.getAttributeValueFromObject[61]<DatabaseMapping.getAttributeValueFromObject[657]<AbstractDirectMapping.buildCloneValue[217]<AbstractDirectMapping.buildClone[189]<AbstractDirectMapping.buildBackupClone[171]<ObjectBuilder.buildBackupClone[607]<DeferredChangeDetectionPolicy.buildBackupClone[227]<DeferredChangeDetectionPolicy.revertChanges[291]<UnitOfWorkImpl.resumeUnitOfWork[5279]<UnitOfWorkImpl.synchronizeAndResume[5228]<RepeatableWriteUnitOfWork.synchronizeAndResume[558]<UnitOfWorkImpl.commitAndResume[1176]<EntityTransactionImpl.commit[134]<Util.persistEntity[26]<ExampleMain2.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity2@1887661178, call-stack: MyEntity2.setMyId[22]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.setAttributeValueInObject[247]<MethodAttributeAccessor.setAttributeValueInObject[226]<DatabaseMapping.setAttributeValueInObject[1652]<AbstractDirectMapping.buildCloneValue[219]<AbstractDirectMapping.buildClone[189]<AbstractDirectMapping.buildBackupClone[171]<ObjectBuilder.buildBackupClone[607]<DeferredChangeDetectionPolicy.buildBackupClone[227]<DeferredChangeDetectionPolicy.revertChanges[291]<UnitOfWorkImpl.resumeUnitOfWork[5279]<UnitOfWorkImpl.synchronizeAndResume[5228]<RepeatableWriteUnitOfWork.synchronizeAndResume[558]<UnitOfWorkImpl.commitAndResume[1176]<EntityTransactionImpl.commit[134]<Util.persistEntity[26]<ExampleMain2.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity2@1636556778, call-stack: MyEntity2.getMyStr[27]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.getAttributeValueFromObject[82]<MethodAttributeAccessor.getAttributeValueFromObject[61]<DatabaseMapping.getAttributeValueFromObject[657]<AbstractDirectMapping.buildCloneValue[217]<AbstractDirectMapping.buildClone[189]<AbstractDirectMapping.buildBackupClone[171]<ObjectBuilder.buildBackupClone[607]<DeferredChangeDetectionPolicy.buildBackupClone[227]<DeferredChangeDetectionPolicy.revertChanges[291]<UnitOfWorkImpl.resumeUnitOfWork[5279]<UnitOfWorkImpl.synchronizeAndResume[5228]<RepeatableWriteUnitOfWork.synchronizeAndResume[558]<UnitOfWorkImpl.commitAndResume[1176]<EntityTransactionImpl.commit[134]<Util.persistEntity[26]<ExampleMain2.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity2@1887661178, call-stack: MyEntity2.setMyStr[32]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.setAttributeValueInObject[247]<MethodAttributeAccessor.setAttributeValueInObject[226]<DatabaseMapping.setAttributeValueInObject[1652]<AbstractDirectMapping.buildCloneValue[219]<AbstractDirectMapping.buildClone[189]<AbstractDirectMapping.buildBackupClone[171]<ObjectBuilder.buildBackupClone[607]<DeferredChangeDetectionPolicy.buildBackupClone[227]<DeferredChangeDetectionPolicy.revertChanges[291]<UnitOfWorkImpl.resumeUnitOfWork[5279]<UnitOfWorkImpl.synchronizeAndResume[5228]<RepeatableWriteUnitOfWork.synchronizeAndResume[558]<UnitOfWorkImpl.commitAndResume[1176]<EntityTransactionImpl.commit[134]<Util.persistEntity[26]<ExampleMain2.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
-- after committing
-- Loading entity MyEntity2
Instance: MyEntity2@916363123, call-stack: MyEntity2.<init>[12]<NativeConstructorAccessorImpl.newInstance0[-2]<NativeConstructorAccessorImpl.newInstance[62]<DelegatingConstructorAccessorImpl.newInstance[45]<Constructor.newInstance[423]<InstantiationPolicy.buildNewInstanceUsingDefaultConstructor[134]<InstantiationPolicy.buildNewInstance[105]<ObjectBuilder.buildNewInstance[660]<InstantiationCopyPolicy.buildClone[31]<AbstractCopyPolicy.buildWorkingCopyClone[39]<ObjectBuilder.instantiateWorkingCopyClone[4013]<UnitOfWorkImpl.cloneAndRegisterObject[1007]<UnitOfWorkImpl.cloneAndRegisterObject[955]<UnitOfWorkIdentityMapAccessor.getAndCloneCacheKeyFromParent[209]<UnitOfWorkIdentityMapAccessor.getFromIdentityMap[137]<UnitOfWorkImpl.registerExistingObject[3940]<ObjectBuildingQuery.registerIndividualResult[448]<ReadObjectQuery.registerResultInUnitOfWork[897]<ObjectLevelReadQuery.checkEarlyReturn[890]<DatabaseQuery.execute[841]<ObjectLevelReadQuery.execute[1134]<ReadObjectQuery.execute[441]<ObjectLevelReadQuery.executeInUnitOfWork[1222]<UnitOfWorkImpl.internalExecuteQuery[2896]<AbstractSession.executeQuery[1857]<AbstractSession.executeQuery[1839]<AbstractSession.executeQuery[1790]<EntityManagerImpl.executeQuery[911]<EntityManagerImpl.findInternal[854]<EntityManagerImpl.find[730]<EntityManagerImpl.find[599]<Util.readEntity[15]<ExampleMain2.main[12]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity2@1642676698, call-stack: MyEntity2.getMyId[17]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.getAttributeValueFromObject[82]<MethodAttributeAccessor.getAttributeValueFromObject[61]<DatabaseMapping.getAttributeValueFromObject[657]<AbstractDirectMapping.buildCloneValue[217]<AbstractDirectMapping.buildClone[189]<ObjectBuilder.populateAttributesForClone[4168]<UnitOfWorkImpl.populateAndRegisterObject[3676]<UnitOfWorkImpl.cloneAndRegisterObject[1026]<UnitOfWorkImpl.cloneAndRegisterObject[955]<UnitOfWorkIdentityMapAccessor.getAndCloneCacheKeyFromParent[209]<UnitOfWorkIdentityMapAccessor.getFromIdentityMap[137]<UnitOfWorkImpl.registerExistingObject[3940]<ObjectBuildingQuery.registerIndividualResult[448]<ReadObjectQuery.registerResultInUnitOfWork[897]<ObjectLevelReadQuery.checkEarlyReturn[890]<DatabaseQuery.execute[841]<ObjectLevelReadQuery.execute[1134]<ReadObjectQuery.execute[441]<ObjectLevelReadQuery.executeInUnitOfWork[1222]<UnitOfWorkImpl.internalExecuteQuery[2896]<AbstractSession.executeQuery[1857]<AbstractSession.executeQuery[1839]<AbstractSession.executeQuery[1790]<EntityManagerImpl.executeQuery[911]<EntityManagerImpl.findInternal[854]<EntityManagerImpl.find[730]<EntityManagerImpl.find[599]<Util.readEntity[15]<ExampleMain2.main[12]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity2@916363123, call-stack: MyEntity2.setMyId[22]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.setAttributeValueInObject[247]<MethodAttributeAccessor.setAttributeValueInObject[226]<DatabaseMapping.setAttributeValueInObject[1652]<AbstractDirectMapping.buildCloneValue[219]<AbstractDirectMapping.buildClone[189]<ObjectBuilder.populateAttributesForClone[4168]<UnitOfWorkImpl.populateAndRegisterObject[3676]<UnitOfWorkImpl.cloneAndRegisterObject[1026]<UnitOfWorkImpl.cloneAndRegisterObject[955]<UnitOfWorkIdentityMapAccessor.getAndCloneCacheKeyFromParent[209]<UnitOfWorkIdentityMapAccessor.getFromIdentityMap[137]<UnitOfWorkImpl.registerExistingObject[3940]<ObjectBuildingQuery.registerIndividualResult[448]<ReadObjectQuery.registerResultInUnitOfWork[897]<ObjectLevelReadQuery.checkEarlyReturn[890]<DatabaseQuery.execute[841]<ObjectLevelReadQuery.execute[1134]<ReadObjectQuery.execute[441]<ObjectLevelReadQuery.executeInUnitOfWork[1222]<UnitOfWorkImpl.internalExecuteQuery[2896]<AbstractSession.executeQuery[1857]<AbstractSession.executeQuery[1839]<AbstractSession.executeQuery[1790]<EntityManagerImpl.executeQuery[911]<EntityManagerImpl.findInternal[854]<EntityManagerImpl.find[730]<EntityManagerImpl.find[599]<Util.readEntity[15]<ExampleMain2.main[12]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity2@1642676698, call-stack: MyEntity2.getMyStr[27]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.getAttributeValueFromObject[82]<MethodAttributeAccessor.getAttributeValueFromObject[61]<DatabaseMapping.getAttributeValueFromObject[657]<AbstractDirectMapping.buildCloneValue[217]<AbstractDirectMapping.buildClone[189]<ObjectBuilder.populateAttributesForClone[4168]<UnitOfWorkImpl.populateAndRegisterObject[3676]<UnitOfWorkImpl.cloneAndRegisterObject[1026]<UnitOfWorkImpl.cloneAndRegisterObject[955]<UnitOfWorkIdentityMapAccessor.getAndCloneCacheKeyFromParent[209]<UnitOfWorkIdentityMapAccessor.getFromIdentityMap[137]<UnitOfWorkImpl.registerExistingObject[3940]<ObjectBuildingQuery.registerIndividualResult[448]<ReadObjectQuery.registerResultInUnitOfWork[897]<ObjectLevelReadQuery.checkEarlyReturn[890]<DatabaseQuery.execute[841]<ObjectLevelReadQuery.execute[1134]<ReadObjectQuery.execute[441]<ObjectLevelReadQuery.executeInUnitOfWork[1222]<UnitOfWorkImpl.internalExecuteQuery[2896]<AbstractSession.executeQuery[1857]<AbstractSession.executeQuery[1839]<AbstractSession.executeQuery[1790]<EntityManagerImpl.executeQuery[911]<EntityManagerImpl.findInternal[854]<EntityManagerImpl.find[730]<EntityManagerImpl.find[599]<Util.readEntity[15]<ExampleMain2.main[12]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity2@916363123, call-stack: MyEntity2.setMyStr[32]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.setAttributeValueInObject[247]<MethodAttributeAccessor.setAttributeValueInObject[226]<DatabaseMapping.setAttributeValueInObject[1652]<AbstractDirectMapping.buildCloneValue[219]<AbstractDirectMapping.buildClone[189]<ObjectBuilder.populateAttributesForClone[4168]<UnitOfWorkImpl.populateAndRegisterObject[3676]<UnitOfWorkImpl.cloneAndRegisterObject[1026]<UnitOfWorkImpl.cloneAndRegisterObject[955]<UnitOfWorkIdentityMapAccessor.getAndCloneCacheKeyFromParent[209]<UnitOfWorkIdentityMapAccessor.getFromIdentityMap[137]<UnitOfWorkImpl.registerExistingObject[3940]<ObjectBuildingQuery.registerIndividualResult[448]<ReadObjectQuery.registerResultInUnitOfWork[897]<ObjectLevelReadQuery.checkEarlyReturn[890]<DatabaseQuery.execute[841]<ObjectLevelReadQuery.execute[1134]<ReadObjectQuery.execute[441]<ObjectLevelReadQuery.executeInUnitOfWork[1222]<UnitOfWorkImpl.internalExecuteQuery[2896]<AbstractSession.executeQuery[1857]<AbstractSession.executeQuery[1839]<AbstractSession.executeQuery[1790]<EntityManagerImpl.executeQuery[911]<EntityManagerImpl.findInternal[854]<EntityManagerImpl.find[730]<EntityManagerImpl.find[599]<Util.readEntity[15]<ExampleMain2.main[12]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity2@1203335210, call-stack: MyEntity2.<init>[12]<NativeConstructorAccessorImpl.newInstance0[-2]<NativeConstructorAccessorImpl.newInstance[62]<DelegatingConstructorAccessorImpl.newInstance[45]<Constructor.newInstance[423]<InstantiationPolicy.buildNewInstanceUsingDefaultConstructor[134]<InstantiationPolicy.buildNewInstance[105]<ObjectBuilder.buildNewInstance[660]<InstantiationCopyPolicy.buildClone[31]<ObjectBuilder.buildBackupClone[592]<DeferredChangeDetectionPolicy.buildBackupClone[227]<UnitOfWorkImpl.populateAndRegisterObject[3677]<UnitOfWorkImpl.cloneAndRegisterObject[1026]<UnitOfWorkImpl.cloneAndRegisterObject[955]<UnitOfWorkIdentityMapAccessor.getAndCloneCacheKeyFromParent[209]<UnitOfWorkIdentityMapAccessor.getFromIdentityMap[137]<UnitOfWorkImpl.registerExistingObject[3940]<ObjectBuildingQuery.registerIndividualResult[448]<ReadObjectQuery.registerResultInUnitOfWork[897]<ObjectLevelReadQuery.checkEarlyReturn[890]<DatabaseQuery.execute[841]<ObjectLevelReadQuery.execute[1134]<ReadObjectQuery.execute[441]<ObjectLevelReadQuery.executeInUnitOfWork[1222]<UnitOfWorkImpl.internalExecuteQuery[2896]<AbstractSession.executeQuery[1857]<AbstractSession.executeQuery[1839]<AbstractSession.executeQuery[1790]<EntityManagerImpl.executeQuery[911]<EntityManagerImpl.findInternal[854]<EntityManagerImpl.find[730]<EntityManagerImpl.find[599]<Util.readEntity[15]<ExampleMain2.main[12]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity2@916363123, call-stack: MyEntity2.getMyId[17]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.getAttributeValueFromObject[82]<MethodAttributeAccessor.getAttributeValueFromObject[61]<DatabaseMapping.getAttributeValueFromObject[657]<AbstractDirectMapping.buildCloneValue[217]<AbstractDirectMapping.buildClone[189]<AbstractDirectMapping.buildBackupClone[171]<ObjectBuilder.buildBackupClone[607]<DeferredChangeDetectionPolicy.buildBackupClone[227]<UnitOfWorkImpl.populateAndRegisterObject[3677]<UnitOfWorkImpl.cloneAndRegisterObject[1026]<UnitOfWorkImpl.cloneAndRegisterObject[955]<UnitOfWorkIdentityMapAccessor.getAndCloneCacheKeyFromParent[209]<UnitOfWorkIdentityMapAccessor.getFromIdentityMap[137]<UnitOfWorkImpl.registerExistingObject[3940]<ObjectBuildingQuery.registerIndividualResult[448]<ReadObjectQuery.registerResultInUnitOfWork[897]<ObjectLevelReadQuery.checkEarlyReturn[890]<DatabaseQuery.execute[841]<ObjectLevelReadQuery.execute[1134]<ReadObjectQuery.execute[441]<ObjectLevelReadQuery.executeInUnitOfWork[1222]<UnitOfWorkImpl.internalExecuteQuery[2896]<AbstractSession.executeQuery[1857]<AbstractSession.executeQuery[1839]<AbstractSession.executeQuery[1790]<EntityManagerImpl.executeQuery[911]<EntityManagerImpl.findInternal[854]<EntityManagerImpl.find[730]<EntityManagerImpl.find[599]<Util.readEntity[15]<ExampleMain2.main[12]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity2@1203335210, call-stack: MyEntity2.setMyId[22]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.setAttributeValueInObject[247]<MethodAttributeAccessor.setAttributeValueInObject[226]<DatabaseMapping.setAttributeValueInObject[1652]<AbstractDirectMapping.buildCloneValue[219]<AbstractDirectMapping.buildClone[189]<AbstractDirectMapping.buildBackupClone[171]<ObjectBuilder.buildBackupClone[607]<DeferredChangeDetectionPolicy.buildBackupClone[227]<UnitOfWorkImpl.populateAndRegisterObject[3677]<UnitOfWorkImpl.cloneAndRegisterObject[1026]<UnitOfWorkImpl.cloneAndRegisterObject[955]<UnitOfWorkIdentityMapAccessor.getAndCloneCacheKeyFromParent[209]<UnitOfWorkIdentityMapAccessor.getFromIdentityMap[137]<UnitOfWorkImpl.registerExistingObject[3940]<ObjectBuildingQuery.registerIndividualResult[448]<ReadObjectQuery.registerResultInUnitOfWork[897]<ObjectLevelReadQuery.checkEarlyReturn[890]<DatabaseQuery.execute[841]<ObjectLevelReadQuery.execute[1134]<ReadObjectQuery.execute[441]<ObjectLevelReadQuery.executeInUnitOfWork[1222]<UnitOfWorkImpl.internalExecuteQuery[2896]<AbstractSession.executeQuery[1857]<AbstractSession.executeQuery[1839]<AbstractSession.executeQuery[1790]<EntityManagerImpl.executeQuery[911]<EntityManagerImpl.findInternal[854]<EntityManagerImpl.find[730]<EntityManagerImpl.find[599]<Util.readEntity[15]<ExampleMain2.main[12]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity2@916363123, call-stack: MyEntity2.getMyStr[27]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.getAttributeValueFromObject[82]<MethodAttributeAccessor.getAttributeValueFromObject[61]<DatabaseMapping.getAttributeValueFromObject[657]<AbstractDirectMapping.buildCloneValue[217]<AbstractDirectMapping.buildClone[189]<AbstractDirectMapping.buildBackupClone[171]<ObjectBuilder.buildBackupClone[607]<DeferredChangeDetectionPolicy.buildBackupClone[227]<UnitOfWorkImpl.populateAndRegisterObject[3677]<UnitOfWorkImpl.cloneAndRegisterObject[1026]<UnitOfWorkImpl.cloneAndRegisterObject[955]<UnitOfWorkIdentityMapAccessor.getAndCloneCacheKeyFromParent[209]<UnitOfWorkIdentityMapAccessor.getFromIdentityMap[137]<UnitOfWorkImpl.registerExistingObject[3940]<ObjectBuildingQuery.registerIndividualResult[448]<ReadObjectQuery.registerResultInUnitOfWork[897]<ObjectLevelReadQuery.checkEarlyReturn[890]<DatabaseQuery.execute[841]<ObjectLevelReadQuery.execute[1134]<ReadObjectQuery.execute[441]<ObjectLevelReadQuery.executeInUnitOfWork[1222]<UnitOfWorkImpl.internalExecuteQuery[2896]<AbstractSession.executeQuery[1857]<AbstractSession.executeQuery[1839]<AbstractSession.executeQuery[1790]<EntityManagerImpl.executeQuery[911]<EntityManagerImpl.findInternal[854]<EntityManagerImpl.find[730]<EntityManagerImpl.find[599]<Util.readEntity[15]<ExampleMain2.main[12]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity2@1203335210, call-stack: MyEntity2.setMyStr[32]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.setAttributeValueInObject[247]<MethodAttributeAccessor.setAttributeValueInObject[226]<DatabaseMapping.setAttributeValueInObject[1652]<AbstractDirectMapping.buildCloneValue[219]<AbstractDirectMapping.buildClone[189]<AbstractDirectMapping.buildBackupClone[171]<ObjectBuilder.buildBackupClone[607]<DeferredChangeDetectionPolicy.buildBackupClone[227]<UnitOfWorkImpl.populateAndRegisterObject[3677]<UnitOfWorkImpl.cloneAndRegisterObject[1026]<UnitOfWorkImpl.cloneAndRegisterObject[955]<UnitOfWorkIdentityMapAccessor.getAndCloneCacheKeyFromParent[209]<UnitOfWorkIdentityMapAccessor.getFromIdentityMap[137]<UnitOfWorkImpl.registerExistingObject[3940]<ObjectBuildingQuery.registerIndividualResult[448]<ReadObjectQuery.registerResultInUnitOfWork[897]<ObjectLevelReadQuery.checkEarlyReturn[890]<DatabaseQuery.execute[841]<ObjectLevelReadQuery.execute[1134]<ReadObjectQuery.execute[441]<ObjectLevelReadQuery.executeInUnitOfWork[1222]<UnitOfWorkImpl.internalExecuteQuery[2896]<AbstractSession.executeQuery[1857]<AbstractSession.executeQuery[1839]<AbstractSession.executeQuery[1790]<EntityManagerImpl.executeQuery[911]<EntityManagerImpl.findInternal[854]<EntityManagerImpl.find[730]<EntityManagerImpl.find[599]<Util.readEntity[15]<ExampleMain2.main[12]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
-- Entity loaded: MyEntity2@916363123

In the output, it's clear that the JPA provider (EclipseLink) read/wrote the entity only via getters/setters. In above output, we should not bogged down in the details that how many times our entity initialized/accessed by the JPA runtime; that rather depends on the internal implementations details, which will be different for different providers. We can, however, clearly observe that how entity was accessed.

Note that, mixing the two default access by placing persistence annotations inconsistently on fields and on properties will result in unexpected results.

Explicit Access Type

We can explicitly specify the access type by using AccessType.PROPERTY or AccessType.FIELD of the @Access annotation. We can use @Access on the class level or field or method level. We can even mix the two types in a single entity class. The other persistence annotations e.g. @Id, @GeneratedValue, @Column etc should be used consistently on the specified access type, otherwise behavior will be unspecified; we will probably have exceptions in that case.

Following example shows the usage of AccessType.Property on class level and AccessType.Field on one of the fields. That way, we can override the specified class level access type on the fields/properties selectively.

@Entity
@Access(AccessType.PROPERTY)
public class MyEntity4 {
  private long myId;
  @Access(AccessType.FIELD)
  private String myStr;

  public MyEntity4() {
      Util.printCallChain(this);
  }

  @Id
  public long getMyId() {
      Util.printCallChain(this);
      return myId;
  }

  public void setMyId(long myId) {
      Util.printCallChain(this);
      this.myId = myId;
  }

  public String getMyStr() {
      Util.printCallChain(this);
      return myStr;
  }

  public void setMyStr(String myStr) {
      Util.printCallChain(this);
      this.myStr = myStr;
  }
}
public class ExampleMain4 {

  public static void main(String[] args) throws Exception {
      EntityManagerFactory emf = Persistence.createEntityManagerFactory("test4");
      MyEntity4 entity = createEntity();
      Util.persistEntity(entity, emf);
      Util.readEntity(MyEntity4.class, 1L, emf);
  }

  private static MyEntity4 createEntity() {
      System.out.println("-- Creating an entity instance ");
      MyEntity4 myEntity = new MyEntity4();
      myEntity.setMyId(1L);
      myEntity.setMyStr("testStr");
      System.out.println("-- Entity created: " + Util.toObjectStr(myEntity));
      return myEntity;
  }
}

Output

[EL Warning]: metadata: 2017-04-06 22:15:46.468--ServerSession(790915218)--Overriding the PROPERTY mapping attribute [method getMyStr] with the FIELD mapping attribute [field myStr] from class [com.logicbig.example.MyEntity4]. To avoid this warning you should mark the attribute [method getMyStr] as transient.
Instance: MyEntity4@1333965146, call-stack: MyEntity4.<init>[17]<NativeConstructorAccessorImpl.newInstance0[-2]<NativeConstructorAccessorImpl.newInstance[62]<DelegatingConstructorAccessorImpl.newInstance[45]<Constructor.newInstance[423]<InstantiationPolicy.buildNewInstanceUsingDefaultConstructor[134]<InstantiationPolicy.buildNewInstance[105]<ClassDescriptor.selfValidationAfterInitialization[4230]<ClassDescriptor.validateAfterInitialization[6099]<ClassDescriptor.postInitialize[3915]<DatabaseSessionImpl.initializeDescriptors[706]<DatabaseSessionImpl.initializeDescriptors[651]<DatabaseSessionImpl.initializeDescriptors[582]<DatabaseSessionImpl.postConnectDatasource[818]<DatabaseSessionImpl.loginAndDetectDatasource[762]<EntityManagerFactoryProvider.login[265]<EntityManagerSetupImpl.deploy[731]<EntityManagerFactoryDelegate.getAbstractSession[205]<EntityManagerFactoryDelegate.getDatabaseSession[183]<EntityManagerFactoryImpl.getDatabaseSession[528]<PersistenceProvider.createEntityManagerFactoryImpl[150]<PersistenceProvider.createEntityManagerFactory[188]<Persistence.createEntityManagerFactory[79]<Persistence.createEntityManagerFactory[54]<ExampleMain4.main[9]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
-- Creating an entity instance
Instance: MyEntity4@1797827483, call-stack: MyEntity4.<init>[17]<ExampleMain4.createEntity[17]<ExampleMain4.main[10]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity4@1797827483, call-stack: MyEntity4.setMyId[28]<ExampleMain4.createEntity[18]<ExampleMain4.main[10]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity4@1797827483, call-stack: MyEntity4.setMyStr[38]<ExampleMain4.createEntity[19]<ExampleMain4.main[10]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
-- Entity created: MyEntity4@1797827483
-- Persisting MyEntity4
Instance: MyEntity4@1539076705, call-stack: MyEntity4.<init>[17]<NativeConstructorAccessorImpl.newInstance0[-2]<NativeConstructorAccessorImpl.newInstance[62]<DelegatingConstructorAccessorImpl.newInstance[45]<Constructor.newInstance[423]<InstantiationPolicy.buildNewInstanceUsingDefaultConstructor[134]<InstantiationPolicy.buildNewInstance[105]<ObjectBuilder.buildNewInstance[660]<UnitOfWorkImpl.registerNotRegisteredNewObjectForPersist[4285]<RepeatableWriteUnitOfWork.registerNotRegisteredNewObjectForPersist[521]<UnitOfWorkImpl.registerNewObjectForPersist[4233]<EntityManagerImpl.persist[507]<Util.persistEntity[24]<ExampleMain4.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity4@1797827483, call-stack: MyEntity4.getMyId[23]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.getAttributeValueFromObject[82]<MethodAttributeAccessor.getAttributeValueFromObject[61]<DatabaseMapping.getAttributeValueFromObject[657]<AbstractDirectMapping.valueFromObject[1178]<ObjectBuilder.extractPrimaryKeyFromObject[3012]<UnitOfWorkImpl.registerNewObjectInIdentityMap[4328]<UnitOfWorkImpl.registerNewObjectClone[4302]<UnitOfWorkImpl.registerNotRegisteredNewObjectForPersist[4291]<RepeatableWriteUnitOfWork.registerNotRegisteredNewObjectForPersist[521]<UnitOfWorkImpl.registerNewObjectForPersist[4233]<EntityManagerImpl.persist[507]<Util.persistEntity[24]<ExampleMain4.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
-- Entity persisted
Instance: MyEntity4@1797827483, call-stack: MyEntity4.getMyId[23]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.getAttributeValueFromObject[82]<MethodAttributeAccessor.getAttributeValueFromObject[61]<DatabaseMapping.getAttributeValueFromObject[657]<AbstractDirectMapping.valueFromObject[1178]<ObjectBuilder.extractPrimaryKeyFromObject[3012]<ObjectBuilder.createObjectChangeSet[2873]<DeferredChangeDetectionPolicy.createObjectChangeSetThroughComparison[155]<DeferredChangeDetectionPolicy.createObjectChangeSet[146]<DeferredChangeDetectionPolicy.calculateChanges[91]<DeferredChangeDetectionPolicy.calculateChangesForNewObject[48]<UnitOfWorkImpl.calculateChanges[662]<UnitOfWorkImpl.commitToDatabaseWithChangeSet[1516]<RepeatableWriteUnitOfWork.commitRootUnitOfWork[278]<UnitOfWorkImpl.commitAndResume[1169]<EntityTransactionImpl.commit[134]<Util.persistEntity[26]<ExampleMain4.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity4@1797827483, call-stack: MyEntity4.getMyId[23]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.getAttributeValueFromObject[82]<MethodAttributeAccessor.getAttributeValueFromObject[61]<DatabaseMapping.getAttributeValueFromObject[657]<AbstractDirectMapping.writeFromObjectIntoRow[1291]<ObjectBuilder.buildRow[1567]<ObjectBuilder.buildRow[1555]<DatabaseQueryMechanism.insertObjectForWrite[451]<InsertObjectQuery.executeCommit[80]<InsertObjectQuery.executeCommitWithChangeSet[90]<DatabaseQueryMechanism.executeWriteWithChangeSet[301]<WriteObjectQuery.executeDatabaseQuery[58]<DatabaseQuery.execute[904]<DatabaseQuery.executeInUnitOfWork[803]<ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery[108]<ObjectLevelModifyQuery.executeInUnitOfWork[85]<UnitOfWorkImpl.internalExecuteQuery[2896]<AbstractSession.executeQuery[1857]<AbstractSession.executeQuery[1839]<AbstractSession.executeQuery[1790]<CommitManager.commitNewObjectsForClassWithChangeSet[227]<CommitManager.commitAllObjectsWithChangeSet[126]<AbstractSession.writeAllObjectsWithChangeSet[4264]<UnitOfWorkImpl.commitToDatabase[1441]<UnitOfWorkImpl.commitToDatabaseWithChangeSet[1531]<RepeatableWriteUnitOfWork.commitRootUnitOfWork[278]<UnitOfWorkImpl.commitAndResume[1169]<EntityTransactionImpl.commit[134]<Util.persistEntity[26]<ExampleMain4.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity4@1797827483, call-stack: MyEntity4.getMyId[23]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.getAttributeValueFromObject[82]<MethodAttributeAccessor.getAttributeValueFromObject[61]<DatabaseMapping.getAttributeValueFromObject[657]<AbstractDirectMapping.valueFromObject[1178]<ObjectBuilder.extractPrimaryKeyFromObject[3012]<ObjectBuilder.extractPrimaryKeyFromObject[2974]<DatabaseQueryMechanism.insertObjectForWrite[466]<InsertObjectQuery.executeCommit[80]<InsertObjectQuery.executeCommitWithChangeSet[90]<DatabaseQueryMechanism.executeWriteWithChangeSet[301]<WriteObjectQuery.executeDatabaseQuery[58]<DatabaseQuery.execute[904]<DatabaseQuery.executeInUnitOfWork[803]<ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery[108]<ObjectLevelModifyQuery.executeInUnitOfWork[85]<UnitOfWorkImpl.internalExecuteQuery[2896]<AbstractSession.executeQuery[1857]<AbstractSession.executeQuery[1839]<AbstractSession.executeQuery[1790]<CommitManager.commitNewObjectsForClassWithChangeSet[227]<CommitManager.commitAllObjectsWithChangeSet[126]<AbstractSession.writeAllObjectsWithChangeSet[4264]<UnitOfWorkImpl.commitToDatabase[1441]<UnitOfWorkImpl.commitToDatabaseWithChangeSet[1531]<RepeatableWriteUnitOfWork.commitRootUnitOfWork[278]<UnitOfWorkImpl.commitAndResume[1169]<EntityTransactionImpl.commit[134]<Util.persistEntity[26]<ExampleMain4.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity4@897719883, call-stack: MyEntity4.<init>[17]<NativeConstructorAccessorImpl.newInstance0[-2]<NativeConstructorAccessorImpl.newInstance[62]<DelegatingConstructorAccessorImpl.newInstance[45]<Constructor.newInstance[423]<InstantiationPolicy.buildNewInstanceUsingDefaultConstructor[134]<InstantiationPolicy.buildNewInstance[105]<ObjectBuilder.buildNewInstance[660]<InstantiationCopyPolicy.buildClone[31]<ObjectBuilder.instantiateClone[3991]<UnitOfWorkImpl.buildOriginal[592]<MergeManager.mergeChangesOfWorkingCopyIntoOriginal[806]<MergeManager.mergeChangesOfWorkingCopyIntoOriginal[705]<MergeManager.mergeChanges[309]<UnitOfWorkImpl.mergeChangesIntoParent[3280]<RepeatableWriteUnitOfWork.mergeChangesIntoParent[379]<RepeatableWriteUnitOfWork.commitRootUnitOfWork[291]<UnitOfWorkImpl.commitAndResume[1169]<EntityTransactionImpl.commit[134]<Util.persistEntity[26]<ExampleMain4.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity4@1797827483, call-stack: MyEntity4.getMyId[23]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.getAttributeValueFromObject[82]<MethodAttributeAccessor.getAttributeValueFromObject[61]<DatabaseMapping.getAttributeValueFromObject[657]<AbstractDirectMapping.mergeIntoObject[1042]<ObjectBuilder.mergeIntoObject[4136]<ObjectBuilder.mergeChangesIntoObject[4069]<MergeManager.mergeChangesOfWorkingCopyIntoOriginal[846]<MergeManager.mergeChangesOfWorkingCopyIntoOriginal[705]<MergeManager.mergeChanges[309]<UnitOfWorkImpl.mergeChangesIntoParent[3280]<RepeatableWriteUnitOfWork.mergeChangesIntoParent[379]<RepeatableWriteUnitOfWork.commitRootUnitOfWork[291]<UnitOfWorkImpl.commitAndResume[1169]<EntityTransactionImpl.commit[134]<Util.persistEntity[26]<ExampleMain4.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity4@897719883, call-stack: MyEntity4.setMyId[28]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.setAttributeValueInObject[247]<MethodAttributeAccessor.setAttributeValueInObject[226]<DatabaseMapping.setAttributeValueInObject[1652]<AbstractDirectMapping.mergeIntoObject[1042]<ObjectBuilder.mergeIntoObject[4136]<ObjectBuilder.mergeChangesIntoObject[4069]<MergeManager.mergeChangesOfWorkingCopyIntoOriginal[846]<MergeManager.mergeChangesOfWorkingCopyIntoOriginal[705]<MergeManager.mergeChanges[309]<UnitOfWorkImpl.mergeChangesIntoParent[3280]<RepeatableWriteUnitOfWork.mergeChangesIntoParent[379]<RepeatableWriteUnitOfWork.commitRootUnitOfWork[291]<UnitOfWorkImpl.commitAndResume[1169]<EntityTransactionImpl.commit[134]<Util.persistEntity[26]<ExampleMain4.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity4@655155337, call-stack: MyEntity4.<init>[17]<NativeConstructorAccessorImpl.newInstance0[-2]<NativeConstructorAccessorImpl.newInstance[62]<DelegatingConstructorAccessorImpl.newInstance[45]<Constructor.newInstance[423]<InstantiationPolicy.buildNewInstanceUsingDefaultConstructor[134]<InstantiationPolicy.buildNewInstance[105]<ObjectBuilder.buildNewInstance[660]<InstantiationCopyPolicy.buildClone[31]<ObjectBuilder.buildBackupClone[592]<DeferredChangeDetectionPolicy.buildBackupClone[227]<DeferredChangeDetectionPolicy.revertChanges[291]<UnitOfWorkImpl.resumeUnitOfWork[5279]<UnitOfWorkImpl.synchronizeAndResume[5228]<RepeatableWriteUnitOfWork.synchronizeAndResume[558]<UnitOfWorkImpl.commitAndResume[1176]<EntityTransactionImpl.commit[134]<Util.persistEntity[26]<ExampleMain4.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity4@1797827483, call-stack: MyEntity4.getMyId[23]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.getAttributeValueFromObject[82]<MethodAttributeAccessor.getAttributeValueFromObject[61]<DatabaseMapping.getAttributeValueFromObject[657]<AbstractDirectMapping.buildCloneValue[217]<AbstractDirectMapping.buildClone[189]<AbstractDirectMapping.buildBackupClone[171]<ObjectBuilder.buildBackupClone[607]<DeferredChangeDetectionPolicy.buildBackupClone[227]<DeferredChangeDetectionPolicy.revertChanges[291]<UnitOfWorkImpl.resumeUnitOfWork[5279]<UnitOfWorkImpl.synchronizeAndResume[5228]<RepeatableWriteUnitOfWork.synchronizeAndResume[558]<UnitOfWorkImpl.commitAndResume[1176]<EntityTransactionImpl.commit[134]<Util.persistEntity[26]<ExampleMain4.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity4@655155337, call-stack: MyEntity4.setMyId[28]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.setAttributeValueInObject[247]<MethodAttributeAccessor.setAttributeValueInObject[226]<DatabaseMapping.setAttributeValueInObject[1652]<AbstractDirectMapping.buildCloneValue[219]<AbstractDirectMapping.buildClone[189]<AbstractDirectMapping.buildBackupClone[171]<ObjectBuilder.buildBackupClone[607]<DeferredChangeDetectionPolicy.buildBackupClone[227]<DeferredChangeDetectionPolicy.revertChanges[291]<UnitOfWorkImpl.resumeUnitOfWork[5279]<UnitOfWorkImpl.synchronizeAndResume[5228]<RepeatableWriteUnitOfWork.synchronizeAndResume[558]<UnitOfWorkImpl.commitAndResume[1176]<EntityTransactionImpl.commit[134]<Util.persistEntity[26]<ExampleMain4.main[11]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
-- after committing
-- Loading entity MyEntity4
Instance: MyEntity4@1263699157, call-stack: MyEntity4.<init>[17]<NativeConstructorAccessorImpl.newInstance0[-2]<NativeConstructorAccessorImpl.newInstance[62]<DelegatingConstructorAccessorImpl.newInstance[45]<Constructor.newInstance[423]<InstantiationPolicy.buildNewInstanceUsingDefaultConstructor[134]<InstantiationPolicy.buildNewInstance[105]<ObjectBuilder.buildNewInstance[660]<InstantiationCopyPolicy.buildClone[31]<AbstractCopyPolicy.buildWorkingCopyClone[39]<ObjectBuilder.instantiateWorkingCopyClone[4013]<UnitOfWorkImpl.cloneAndRegisterObject[1007]<UnitOfWorkImpl.cloneAndRegisterObject[955]<UnitOfWorkIdentityMapAccessor.getAndCloneCacheKeyFromParent[209]<UnitOfWorkIdentityMapAccessor.getFromIdentityMap[137]<UnitOfWorkImpl.registerExistingObject[3940]<ObjectBuildingQuery.registerIndividualResult[448]<ReadObjectQuery.registerResultInUnitOfWork[897]<ObjectLevelReadQuery.checkEarlyReturn[890]<DatabaseQuery.execute[841]<ObjectLevelReadQuery.execute[1134]<ReadObjectQuery.execute[441]<ObjectLevelReadQuery.executeInUnitOfWork[1222]<UnitOfWorkImpl.internalExecuteQuery[2896]<AbstractSession.executeQuery[1857]<AbstractSession.executeQuery[1839]<AbstractSession.executeQuery[1790]<EntityManagerImpl.executeQuery[911]<EntityManagerImpl.findInternal[854]<EntityManagerImpl.find[730]<EntityManagerImpl.find[599]<Util.readEntity[15]<ExampleMain4.main[12]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity4@897719883, call-stack: MyEntity4.getMyId[23]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.getAttributeValueFromObject[82]<MethodAttributeAccessor.getAttributeValueFromObject[61]<DatabaseMapping.getAttributeValueFromObject[657]<AbstractDirectMapping.buildCloneValue[217]<AbstractDirectMapping.buildClone[189]<ObjectBuilder.populateAttributesForClone[4168]<UnitOfWorkImpl.populateAndRegisterObject[3676]<UnitOfWorkImpl.cloneAndRegisterObject[1026]<UnitOfWorkImpl.cloneAndRegisterObject[955]<UnitOfWorkIdentityMapAccessor.getAndCloneCacheKeyFromParent[209]<UnitOfWorkIdentityMapAccessor.getFromIdentityMap[137]<UnitOfWorkImpl.registerExistingObject[3940]<ObjectBuildingQuery.registerIndividualResult[448]<ReadObjectQuery.registerResultInUnitOfWork[897]<ObjectLevelReadQuery.checkEarlyReturn[890]<DatabaseQuery.execute[841]<ObjectLevelReadQuery.execute[1134]<ReadObjectQuery.execute[441]<ObjectLevelReadQuery.executeInUnitOfWork[1222]<UnitOfWorkImpl.internalExecuteQuery[2896]<AbstractSession.executeQuery[1857]<AbstractSession.executeQuery[1839]<AbstractSession.executeQuery[1790]<EntityManagerImpl.executeQuery[911]<EntityManagerImpl.findInternal[854]<EntityManagerImpl.find[730]<EntityManagerImpl.find[599]<Util.readEntity[15]<ExampleMain4.main[12]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity4@1263699157, call-stack: MyEntity4.setMyId[28]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.setAttributeValueInObject[247]<MethodAttributeAccessor.setAttributeValueInObject[226]<DatabaseMapping.setAttributeValueInObject[1652]<AbstractDirectMapping.buildCloneValue[219]<AbstractDirectMapping.buildClone[189]<ObjectBuilder.populateAttributesForClone[4168]<UnitOfWorkImpl.populateAndRegisterObject[3676]<UnitOfWorkImpl.cloneAndRegisterObject[1026]<UnitOfWorkImpl.cloneAndRegisterObject[955]<UnitOfWorkIdentityMapAccessor.getAndCloneCacheKeyFromParent[209]<UnitOfWorkIdentityMapAccessor.getFromIdentityMap[137]<UnitOfWorkImpl.registerExistingObject[3940]<ObjectBuildingQuery.registerIndividualResult[448]<ReadObjectQuery.registerResultInUnitOfWork[897]<ObjectLevelReadQuery.checkEarlyReturn[890]<DatabaseQuery.execute[841]<ObjectLevelReadQuery.execute[1134]<ReadObjectQuery.execute[441]<ObjectLevelReadQuery.executeInUnitOfWork[1222]<UnitOfWorkImpl.internalExecuteQuery[2896]<AbstractSession.executeQuery[1857]<AbstractSession.executeQuery[1839]<AbstractSession.executeQuery[1790]<EntityManagerImpl.executeQuery[911]<EntityManagerImpl.findInternal[854]<EntityManagerImpl.find[730]<EntityManagerImpl.find[599]<Util.readEntity[15]<ExampleMain4.main[12]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity4@1353879483, call-stack: MyEntity4.<init>[17]<NativeConstructorAccessorImpl.newInstance0[-2]<NativeConstructorAccessorImpl.newInstance[62]<DelegatingConstructorAccessorImpl.newInstance[45]<Constructor.newInstance[423]<InstantiationPolicy.buildNewInstanceUsingDefaultConstructor[134]<InstantiationPolicy.buildNewInstance[105]<ObjectBuilder.buildNewInstance[660]<InstantiationCopyPolicy.buildClone[31]<ObjectBuilder.buildBackupClone[592]<DeferredChangeDetectionPolicy.buildBackupClone[227]<UnitOfWorkImpl.populateAndRegisterObject[3677]<UnitOfWorkImpl.cloneAndRegisterObject[1026]<UnitOfWorkImpl.cloneAndRegisterObject[955]<UnitOfWorkIdentityMapAccessor.getAndCloneCacheKeyFromParent[209]<UnitOfWorkIdentityMapAccessor.getFromIdentityMap[137]<UnitOfWorkImpl.registerExistingObject[3940]<ObjectBuildingQuery.registerIndividualResult[448]<ReadObjectQuery.registerResultInUnitOfWork[897]<ObjectLevelReadQuery.checkEarlyReturn[890]<DatabaseQuery.execute[841]<ObjectLevelReadQuery.execute[1134]<ReadObjectQuery.execute[441]<ObjectLevelReadQuery.executeInUnitOfWork[1222]<UnitOfWorkImpl.internalExecuteQuery[2896]<AbstractSession.executeQuery[1857]<AbstractSession.executeQuery[1839]<AbstractSession.executeQuery[1790]<EntityManagerImpl.executeQuery[911]<EntityManagerImpl.findInternal[854]<EntityManagerImpl.find[730]<EntityManagerImpl.find[599]<Util.readEntity[15]<ExampleMain4.main[12]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity4@1263699157, call-stack: MyEntity4.getMyId[23]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.getAttributeValueFromObject[82]<MethodAttributeAccessor.getAttributeValueFromObject[61]<DatabaseMapping.getAttributeValueFromObject[657]<AbstractDirectMapping.buildCloneValue[217]<AbstractDirectMapping.buildClone[189]<AbstractDirectMapping.buildBackupClone[171]<ObjectBuilder.buildBackupClone[607]<DeferredChangeDetectionPolicy.buildBackupClone[227]<UnitOfWorkImpl.populateAndRegisterObject[3677]<UnitOfWorkImpl.cloneAndRegisterObject[1026]<UnitOfWorkImpl.cloneAndRegisterObject[955]<UnitOfWorkIdentityMapAccessor.getAndCloneCacheKeyFromParent[209]<UnitOfWorkIdentityMapAccessor.getFromIdentityMap[137]<UnitOfWorkImpl.registerExistingObject[3940]<ObjectBuildingQuery.registerIndividualResult[448]<ReadObjectQuery.registerResultInUnitOfWork[897]<ObjectLevelReadQuery.checkEarlyReturn[890]<DatabaseQuery.execute[841]<ObjectLevelReadQuery.execute[1134]<ReadObjectQuery.execute[441]<ObjectLevelReadQuery.executeInUnitOfWork[1222]<UnitOfWorkImpl.internalExecuteQuery[2896]<AbstractSession.executeQuery[1857]<AbstractSession.executeQuery[1839]<AbstractSession.executeQuery[1790]<EntityManagerImpl.executeQuery[911]<EntityManagerImpl.findInternal[854]<EntityManagerImpl.find[730]<EntityManagerImpl.find[599]<Util.readEntity[15]<ExampleMain4.main[12]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
Instance: MyEntity4@1353879483, call-stack: MyEntity4.setMyId[28]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<MethodAttributeAccessor.setAttributeValueInObject[247]<MethodAttributeAccessor.setAttributeValueInObject[226]<DatabaseMapping.setAttributeValueInObject[1652]<AbstractDirectMapping.buildCloneValue[219]<AbstractDirectMapping.buildClone[189]<AbstractDirectMapping.buildBackupClone[171]<ObjectBuilder.buildBackupClone[607]<DeferredChangeDetectionPolicy.buildBackupClone[227]<UnitOfWorkImpl.populateAndRegisterObject[3677]<UnitOfWorkImpl.cloneAndRegisterObject[1026]<UnitOfWorkImpl.cloneAndRegisterObject[955]<UnitOfWorkIdentityMapAccessor.getAndCloneCacheKeyFromParent[209]<UnitOfWorkIdentityMapAccessor.getFromIdentityMap[137]<UnitOfWorkImpl.registerExistingObject[3940]<ObjectBuildingQuery.registerIndividualResult[448]<ReadObjectQuery.registerResultInUnitOfWork[897]<ObjectLevelReadQuery.checkEarlyReturn[890]<DatabaseQuery.execute[841]<ObjectLevelReadQuery.execute[1134]<ReadObjectQuery.execute[441]<ObjectLevelReadQuery.executeInUnitOfWork[1222]<UnitOfWorkImpl.internalExecuteQuery[2896]<AbstractSession.executeQuery[1857]<AbstractSession.executeQuery[1839]<AbstractSession.executeQuery[1790]<EntityManagerImpl.executeQuery[911]<EntityManagerImpl.findInternal[854]<EntityManagerImpl.find[730]<EntityManagerImpl.find[599]<Util.readEntity[15]<ExampleMain4.main[12]<NativeMethodAccessorImpl.invoke0[-2]<NativeMethodAccessorImpl.invoke[62]<DelegatingMethodAccessorImpl.invoke[43]<Method.invoke[498]<ExecJavaMojo$1.run[293]<Thread.run[745]<
-- Entity loaded: MyEntity4@1263699157

Above output shows that JPA provider never accessed 'myStr' via it's setter/getter.

Example Project

Dependencies and Technologies Used :

  • h2 1.4.193: H2 Database Engine.
  • eclipselink 2.6.4: EclipseLink build based upon Git transaction 44060b6.
  • javax.persistence 2.1.1: javax.persistence build based upon git transaction 40384f5.
  • JDK 1.8
  • Maven 3.3.9

Access Type Examples Select All Download
  • jpa-access-type-examples
    • src
      • main
        • java
          • com
            • logicbig
              • example
        • resources
          • META-INF

See Also