posted 13 years ago
I have a class A which has a .
I use it in an web application, so A becomes detached. The User can add B instances to A.
When I try to merge A which reference a new B instance I get
Caused by: org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: B
Is this the expected behavior for JPA 2.0?
Do I have to write code to save B before saving A or this there some way to automate this with the right mapping annotations?
Thanks,
Hans