 <p>Call merge(), and use its returned value: it's the attached entity containing the values found in the detached entity passed as argument:</p> <pre><code>Foo modifiedAttachedFoo = session.merge(modifiedDetachedFoo); modifiedAttachedFoo.getLazyCollection().size(); // no problem: the entity is attached </code></pre>