Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

one To one mapping through third table.

 
ambar patil
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to have one to one relationship like these(in many to many way):
class A{

@oneToOne
BRef bref;

}

class Bref{

A a

B b

@oneToOne
getA()..

@oneToOne
getB()..
}

class B{
}
?
 
Mike Keith
author
Ranch Hand
Posts: 304
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure. It is not like a many-to-many, though. It is still a one-to-one. All you are doing is adding a level of indirection between A and B.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic