Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

hibernate-one to one relationship  RSS feed

 
anish reddy
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello

iam facing diffculty while establishing one to one relationship between 2 tables.
my tables are
1.Student-which contains fields like - name,sno
2.library-which contains fields like-lno,lbookname

i want to establish relation between student->sno to library->lno

can any provide sample mapping file for the above said relation between student and library.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Hibernate documentation covers this. What have you tried?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!