There is a problem in DefaultMergeEventListener.entityIsTransient() before the call of DefaultMergeEventListener.saveTransientEntity(). The Transients are nulled in the copy and so not available in the afterwards called PreUpdate/Persist method of the entity. If the entity is handled by DefaultPersistEventListener and DefaultFlushEntityEventListener, there is not problem and the Transients are available. I've found some related very old (a few years), unhandled reports, which describe the issue very complicated with difficult situations and conditions. But the problem isn't really that difficult. This simply breaks the API. |