• Post Reply Bookmark Topic Watch Topic
  • New Topic

Issues with @PrimaryKeyJoinColumn  RSS feed

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Facing issues with the above annotation .

Reading "Mannings in action book for ejb3 " and trying out a few examples

This is a Master Child relation with Child containing the FK
The FK in Child is also the PK for that Table

So from my understanding we need to use :: @PrimaryKeyJoinColumn

However I get the following exception ::


Thanks ,
-anagha
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Faced this issue in last week while reading the same book.. figured out how to do this... giving the full sample code for mapping



Important point to note the usage of "GenericGenerator". Just google for this if you need more info. Hope this helps. Thanks

regards,
Ramdas
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please help me with the hibernate one to one mapping.
partnerform(identification_no,verification_no)
loginform(user_id,username,password,identification_no)

user_id = PK of loginform
identification_no = PK of partnerform, FK of loginform





the exceptions listng
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks, Ramdas Sawant, working example you posted helped me very much.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!