Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB3 simple schema problem - please help!

 
Adam Koprowski
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm having a really silly problem but I really cannot handle it - can you guys please help?
I want to have two entity beans: Adult & Child, where every child should have two references to adult: mother & father. I want the relation to be bi-directional. Can anybody throw a few lines with the appropriate code? Because whatever I'm doing, I'm getting it all wrong.

Thanks a lot in advance!
Adam
 
Adam Koprowski
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As a matter of fact adult-child was not a good example because I want the relation to be 1-1. So for the sake of the example, suppose every adult can only have 0 or 1 children ;-).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic