Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Data loss within postCalculateUnitOfWorkChangeSet() event

Hello everyone,

I am using a SessionEventListener to persist new objects during the postCalculateUnitOfWorkChangeSet() event.

These objects won't get persisted in the next writeChanges() call (e.g. flush/transaction commit) by the UnitOfWork. The UnitOfWork doesn't recognize the new objects as new, isObjectNew(object); returns false.

As a consequence, the UnitOfWork does an update instead of an insert (which of course fails because the record doesn't exist, but without an exception) - the object is lost.

Are there any workarounds for this bug?

Best regards,
Patric








Back to the top