I have 2 Classes, Parent and Child, with a @OneToMany
relationship. Every parent has 0 or more children.
@OneToMany(fetch=FetchType.LAZY, cascade={CascadeType.REMOVE})
The Parent class has also other fields like the name.
I'm in a Container env, so my UI is made of JSP.
When I want to change the Parent
object I have to pass it to a servlet and down to the client browser. In the web page I don't want to put all the children information, I only whant to have a text field for the parent name.
When the control return to me, I'd like to create a new Parent
object with the brand new name and to merge
with the EntityManger
without worrying about the children.