• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate Save Or Update question

 
satya devarapalli
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lets say I have an ORM which has several child instances. If there is change in only one of the fields in the child instance and I do a save or update on the parent ORM, will it just save the instance that has the change?

I would like to know if there is any performance issue doing a save on the parent ORM since it has several other child instances. I could do a save just on the Child instance that will change but I want to keep my code generic.
 
Anindya Roy
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can do it with hibernate inheritance.

You can find an example http://www.sblog.in/2014-03-08-02-28-32/hibernate/35-inheritance-strategy-in-hibernate
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic