• Post Reply Bookmark Topic Watch Topic
  • New Topic

one to one mapping between two tables using hibernate

 
anish reddy
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • 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
 
Vikas Kapoor
Ranch Hand
Posts: 1374
  • Mark post as helpful
  • send pies
  • 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?
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!