• 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
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic