JPA with JTA: Persist entity and merge cascaded child entities
问题 I have a bidirectional one-to-many relationship with the following entity classes: 0 or 1 client <-> 0 or more product orders When persisting the client entity I want the associated product order entities to be persisted, too (as their foreign key to the "parent" client may have been updated). Of course all required CASCADE options are set on the client side. But it does not work if a newly created client is persisted for the first time while referencing an existing product order as in this