• Post Reply Bookmark Topic Watch Topic
  • New Topic

orphan delete for @onetoone

 
srini carry
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The book Hibernate in action says not to use



for mapping why not please explain me ?



why is this wrong ?
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the idea of an orphan really exist for one to one entities? Which side would be the orphan?

Just an idea.

-Cameron McKenzie
 
srini carry
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cameron Wallace McKenzie wrote:Does the idea of an orphan really exist for one to one entities? Which side would be the orphan?

Just an idea.

-Cameron McKenzie


Lets take the example of Application and Award , An application can have only one award. So application and award are onetoone. If an application is deleted award must also be deleted so here orphan delete will help me
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!