Regresion after upgrade to 4.2.0: hibernate merge detached Object twice

Description

Hi i have two entities in OneToMany relation like this:

and use case like this:

caused exception

Simple maven test case attached.

Environment

None

Assignee

Gail Badner

Reporter

Jan Hodac

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Priority

Major
Configure