First I would like to point out that you do not need both the merge() and the persist() only the merge() is needed. If however you were to call the operation in the other order, as a workaround, the Child should have an ID assigned. Also an ID should be assigned to the Child if you were to issue a flush() in your example after the merge() call. Please file an Issue Tracker issue.
--Gordon
[Message sent by forum member 'gyorke' (gyorke)]
http://forums.java.net/jive/thread.jspa?messageID=227349