Odd behavior with Parent/Child cascade persistence

Description

See attached maven project

In the run() method, there are two lines commented (1) and (2). As it stands, the 3rd child does not get persisted. If you comment out line (1), the 3rd child is persisted. Comment it out again and uncomment (2), the 3rd child gets persisted.

Why does the reload of the Parent object in the run() method cause its Children collection not to be saved on a call to saveOrUpdate()?

Environment

Mac OS X 10.6.8, JDK 7

Activity

Show:
Brett Meyer
October 9, 2013, 12:25 AM

Please start questions like this in the user forums: https://forum.hibernate.org/viewforum.php?f=1. Open JIRA tickets only when there is a concise, reproduceable issue within ORM. Thanks!

Assignee

Unassigned

Reporter

Nick Pratt

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

Major
Configure