[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5315?page=c...
]
Erik-Berndt Scheper commented on HHH-5315:
------------------------------------------
Ok, I've pinpointed the problem to a cascading collection. However, I still cannot
reproduce the problem with an envers testcase. Therefore I will attach both the envers
testcase as a patch (one that does *not* fail!) and an eclipse project that *does* fail.
AuditJoinTable rows are no longer flushed to the database
---------------------------------------------------------
Key: HHH-5315
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5315
Project: Hibernate Core
Issue Type: Bug
Components: envers
Affects Versions: 3.5.1, 3.5.2
Environment: JPA with extended persistence context
Reporter: Erik-Berndt Scheper
Assignee: Adam Warski
Priority: Minor
In Hibernate core 3.5.1 issue HHH-3543 was fixed by using
BeforeTransactionCompletionProcess instead of a transaction synchronization. I have found
that since this change, rows in AuditJoinTables are no longer flushed to the database.
(Envers 3.5.0 final works fine).
I can work around the issue by adding a manual entityManager.flush() or by setting the
flushmode to manual.
I have noticed that AuditProcess.java already executes a flush() statement, but this does
not seem to suffice. I believe this is caused by the fact that during the
doBeforeTransactionCompletion() extra WorkUnits are added to the hibernate ActionQueue
(PersistentCollectionChangeWorkUnit) which process the AuditJoinTables.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira