• Post Reply Bookmark Topic Watch Topic
  • New Topic

Why use <many-to-one> for having <one-to-one> foreign key relationship?

Mustafa Garhi
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey ranchers,

If i need to have one-to-one unidirectional foreign key based relation between a Mouth and a Tongue i have to have this is in my Mouth.hbm.xml :

<many-to-one name="tongue"

Why is <one-to-one> tag itself not powerful enough for this work?

Do we have a tutorial that teaches what exactly each such tag (e.g. <one-to-one>) is supposed to do and what it is not?

Thanks buddies.
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
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!