• 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

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.


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 ?

Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!