Search code examples
javajpaeclipselinkunit-of-work

What does "Register the existing object ..." mean in the logfile?


hello i use eclipselink in my program. When logging jpa commands I noticed that "register the existing object" is always made. What does it mean?

[EL Finest]: transaction: 2019-06-25 15:10:31.076--UnitOfWork(277940086)--Thread(Thread[http-bio-8080-exec-2,5,main])--Register the existing object China

Solution

  • "Register the existing object" means that the object is assigned with the current UnitOfWork and is the method of EclipseLink that implements the merge() interface method of JPA EntityManager.

    This operation makes the UnitOfWork take care of changes and will also attache the object to the persistence context and the transaction.

    Please find more about this topic in the official documentation:

    https://wiki.eclipse.org/Using_Basic_Unit_of_Work_API_(ELUG)