[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-7295) ParentAuditing Test in Envers Testsuite fails across different databases with different error messages because Hibernate does not set LockMode correctly

Lukasz Antoniak (JIRA) noreply at atlassian.com
Wed May 2 17:52:50 EDT 2012


    [ https://hibernate.onjira.com/browse/HHH-7295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46480#comment-46480 ] 

Lukasz Antoniak commented on HHH-7295:
--------------------------------------

Envers has a concept of audit entities which store historical data. If {{ValidityAuditStrategy}} is used, audit tables contain extra column {{END_REV}} which points to the last revision when particular data was valid. This allows generating more efficient queries. When an entity gets modified, we need to update {{END_REV}} of the last corresponding (matched by id) entry in the audit table. To achieve this {{ValidityAuditStrategy}} executes SELECT FOR UPDATE and then UPDATE. SELECT FOR UPDATE can cause issues for some dialects with inheritance mappings. I have been working on the workaround: https://github.com/lukasz-antoniak/hibernate-core/commit/5d2e6dc5ebcac5bbea752013f0a53a44b52a886f. This works and waits for Adam to review. Upgrade lock has been added to resolve HHH-6647.

> ParentAuditing Test in Envers Testsuite fails across different databases with different error messages because Hibernate does not set LockMode correctly
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HHH-7295
>                 URL: https://hibernate.onjira.com/browse/HHH-7295
>             Project: Hibernate ORM
>          Issue Type: Bug
>          Components: envers
>    Affects Versions: 4.1.2
>            Reporter: Madhumita Sadhukhan
>            Assignee: Strong Liu
>
> Please refer https://issues.jboss.org/browse/JBPAPP-8892 for details

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list