• 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
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Hibernate one-to-on id mapping issue

 
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I am having a small mapping issue, and its pretty much down to what I am trying to do.

I have tableA and tableB, tableB has a foreign key to tableA, now the difficult comes in that I dont want to have a foreign key in tableA point to tableB, but most of the relationship will be seen from the perspective of tableA, that is to say, tableA has zero or one tableB.

Now even using the foreign-key attrubute in the mapping file, hibernate is still defaulting to match the primary keys of both tables involved.

Any ideas?
Is this possible?
Should I learn to spell?

Thanks
Gavin
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic