• 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic