Hi,
I have an Object in which is an other one.
When i add the child to the parent, i have to flushing the child before saving the parent.
How cann I save the child when i save the parent?
hier an example:
Parent pa=new Parent();
pa. add(new Child());
pa.save(); -> here comes the error message
net.sf.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: de
I want the the error massage dont appers and the parent saves automaticly his child.
How can i do this?
|