merge() does not attach the instance you gave it. It copies the state onto a managed instance and returns THAT - so writes to your original after the call are silently discarded.
This topic is available to PRO members.
Open this topic Go PRO Sign in Create a free accountRun this yourself in the Online Java Compiler, spin up a live REST API in the API Sandbox, or practise with Java interview questions.
Published 2026-08-25