• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate - SaveorUpdate

 
Neeraj Vij
Ranch Hand
Posts: 315
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am analyzing some third party hibernate code. I can't execute it to test. I Need some inputs for help.

I have a parent-child mapping defined in the hbm.xml files.

Parent.setChild(c);

Parent.setAddess();
.
.
..
And few other setter for parent.

But in the end, the data is commited using the statement

" getSession().saveOrUpdate(Parent.getChild()); "

is this code fine ?.. will it commit the child details to db or the parent details also ?

Thanks,
Neeraj.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic