After merging a detached entity with a "@OneToMany(mappedBy)" the session is dirty

Description

I have an entity with a parent child relationship:

When merging a detached entity with the session, the session is marked as dirty:

Environment

None

Activity

Show:
Tobias Liefke
December 6, 2016, 3:06 PM

It seems that the children collection is the source of the dirty flag. No matter if I initialize the children collection or not - it is triggering the "dirty" flag.

Tobias Liefke
December 6, 2016, 3:11 PM

The problem does not exist with bytecode enhancement (as expected, as in that case the instance itself knows what is dirty)

Assignee

Unassigned

Reporter

Tobias Liefke

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Minor
Configure