• 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

one to one mapping between two tables using hibernate

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
iam trying to establish one to one relation between two entities using hibernate.

my enities are namely Student,Library
Student- fields-sno number (PK),sname varchar2(10) which correspond to table in db ie(oracle)
Library-fields-lno number(fk),lname varchar2(10) which correspond to table in db ie(oracle)

can any one give how to write mapping file for above entites to maintain one to one relation
and also entity fields.

can any one give information regarding it or code

i would thankful to them
 
Ranch Hand
Posts: 1374
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Anish,

The main purpose of JavaRanch is to let the people learn. So show us some effort. http://faq.javaranch.com/java/ShowSomeEffort . We would be really happy to help you but we are not a code mill. http://faq.javaranch.com/java/NotACodeMill What have you done with your problem so far?
 
reply
    Bookmark Topic Watch Topic
  • New Topic