Same post, with errors corrected.
In Beta 1, if you query for an Entity, detach that entity, and then use that entity as a reference in a new transient entity, the persist operation on the transient entity fails when cascading to the pre-existing entity with a org.hibernate.PersistentObjectException ("detached entity passed to persist").
This seems like the wrong thing to do -- here's an example:
// uses the EM to return a person. the person object will be detached here
Person owner = personDAO.getPerson(1);
Pet pet1 = new Pet();
// should persist pet and the cascade to owner should not fail... how else would we persist pet?
Stacktrace shows AbstractSaveEventListener.cascadeBeforeSave() calling .Cascade.cascade which eventually leads to CascadingAction$8.cascade and SessionImpl.persist().
The semantic is correct. add merge to the cascaded operations