• Post Reply Bookmark Topic Watch Topic
  • New Topic

best practice with @OneToMany entity

 
David Spades
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the best practice in hibernate parent child objects? lets say in this case a country may have several states. Is it recommended to annotate country class with cascade or exclude cascading behavior at all? the reason is because states and country may have their own data layers and services, and we "cascade" database operations via calls to those methods. Is this the best practice? or should we leave the cascading to hibernate? what are the pros and cons of each approach? or is there any other approach?
thanks
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!