• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How can I use many-to-one without foreign-key

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
How can I use many-to-one with unique column, that column is not foreign-key. Here is a code,

Now If I don't have "gdm_id" as a foreign-key, it only a unique column. Then how could I map to Department unique column.

Thanks & Regards,
Gajen
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't see the use of foreign-key in many-to-one in this from the Hibernate docs pages.

http://www.hibernate.org/hib_docs/v3/reference/en/html/associations.html#assoc-unidirectional-m21

It seems it is just using some column not a specific FK field.

Mark
 
reply
    Bookmark Topic Watch Topic
  • New Topic