 <p>Its been some time since I 've last worked with Hibernate and the problem is of a difficult nature so I will just describe various options:</p> <ul> <li><p>Since your <code>Trace</code> object has a <code>Cascade.All</code> option shouldn't it be enough to just add the <code>TraceEvent</code> on the set and call <code>session.save(trace)</code>? As it is now, my impression is that when the session closes it will try to save the <code>Trace</code> object. Alternatively avoid modifying the set. Just save the <code>TraceEvent</code>. You don't return <code>Trace</code> to be used anywere so there is no point in modifying it. Next time it will be used, it will probably be loaded from the database. All the above behaviour might depend on your configuration but it might worth taking a look.</p></li> <li><p>Do you use some sort of hibernate cache? Could it be that it happens that a <code>Trace</code> object might not be the most recent version? </p></li> <li><p>How <code>TraceEvent</code> is created? Could it be that this object is detached (loaded in a previous request and re-used now?) It seems rather unlikely but please check.</p></li> <li><p>This seems like a function that could be called from many places (i.e. to record a user's action). Is it possible that one of those other places are using the same session and possibly modifying it?</p></li> <li><p>Assuming that it is called from many places, were you able from your logs to link the error with some specific business functionality (e.g. when the user clicks that link/button etc)?</p></li> <li><p>If all else fail why don't you try to add an <code>EventListener</code> or an <code>Interceptor</code> on persist event next time you will update your production environment (I understand that you cannot replicate this error easily). It would be a simple one that would catch <code>NonUniqueObjectException</code> it could print additional log info, and then just re-throw</p></li> </ul>