• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

bi-directional, uni-directional, curious?

 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
in a different thread (that I didn't want to derail) a user asked a question about using bi-directional or uni-directional links. uni-directional links are an oddity in my mind, so I was perplexed when I read the following exchange:

http://forums.hibernate.org/viewtopic.php?t=943384&highlight=bidirectional+listindex&sid=1e19f557855a43d8854db19a7f411d27

in which Gavin suggests that a user split his/her model from a bi-directional association into 2 uni-directional associations (to accomodate the list-index element for lists).

I don't really know what this means, so I have to ask: what are 2 uni-directional links? If you put one uni-directional link in one hbm.xml file and another uni-directional link in a separate file, haven't you accidentally created a bi-directional link?? What am I missing? I'll go on a run in your name if you will enlighten me.
[ March 13, 2007: Message edited by: Matt Horton ]
 
Matt Horton
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
der!

omg, I did it. now I will bathe in the love that must cometh down from Christian Bauer. I read and read, and iteratively guessed and then the hibernate writers were pleased.

pththt. Nice docs. Better product.
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sounds like a personal problem to me. Whichever way you want to go, is fine. Just know if you need to come out of the closet, we will fully support you.

Congrats on your successful mapping

Mark
 
Matt Horton
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
Ranch Hand
Posts: 1170
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I prefer unidirectional. I think bidirectional is the preference of database centric folks. In the end it dont matter because you can change back and forth without altering the schema.
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic