Hello, we have an application with links between entities on differents schemas:
Entity A (from schema 1) -----@OneToMany(cascade=MERGE)----> Entity B (from schema 2).
Sometimes we have a problem with cascade type merge when Merging A in this case:
A = getAbyId(id)
A.setB( new B() )
object references an unsaved transient instance – save the transient instance before flushing
this error refers object B as the unsaved entity.
I thought that with cascade TYPE = Merge, it should handle in the right order the save of B then A.
Should we handle this manually?