Uploaded image for project: 'Hibernate ORM'
  1. HHH-7918

Merging 2 ModWorkUnits ended with incorrect values of modified flags

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects versions: None
    • Fix versions: 4.2.0.CR1, 4.1.10
    • Components: hibernate-envers
    • Labels:
      None
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true
    • Sprint:

      Description

      I flushed entitymanager twice (using autoflush) in one transaction.
      First flush ended in ModWorkUnit with 3 modified attribute flags set to true
      Second flush ended in ModWorkUnit wih 1 modified attribute flag set to true.

      Merge of these two ModWorkUnits ended in ModWorkUnit with corrent entity, but only with 1 modified attribute flag set to true.

      I suppose this is because this method:

      public AuditWorkUnit merge(ModWorkUnit second) {
      return second;
      }

      I thing mod flags should be set again by comparing second ModWorkUnit with state of entity before first ModWorkUnit.

        Attachments

          Issue links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: