• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

default value in @oneToOne

 
Senthilrajan Chennai
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Frnds, I'm new to EJB & have a basic doubt in oneToOne.

I used Cutomer & Address entities with oneToOne relation.
If I don't specify @JoinColumn, @PrimaryKeyJoinClumn in the @oneToOne relationship, It works fine without any error.

Is it mean that priamykeyJoinColumn is taken by default?

Thanks in Advance.
 
Amandeep Singh
Ranch Hand
Posts: 850
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
primarykeyjoincolumn is not defined default. when you define only @onetoone annotation, the persistence provider automatically joins using the primar keys only. whereas using primarykeyjoincolumn , we have option to have define relationship's between column's.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic