Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

bi-directional, uni-directional, curious?

 
Matt Horton
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
 
Mr. C Lamont Gilbert
Ranch Hand
Posts: 1170
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic