• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Issues with @PrimaryKeyJoinColumn

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks, Ramdas Sawant, working example you posted helped me very much.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic