We're updating the issue view to help you get more done. 

Merging 2 ModWorkUnits ended with incorrect values of modified flags

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.

Environment

None

Status

Assignee

Lukasz Antoniak

Reporter

Michal Kurtak

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Priority

Major