• Post Reply Bookmark Topic Watch Topic
  • New Topic

Using join in hibernate mapping

 
Priya Venkatesan
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am learning to use a <join> in my mapping. Is there any sample mapping and source code which some can point me to?
 
Avinash Rawana
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Examples
 
Priya Venkatesan
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. I am also looking for code samples. My confusion is if I have one class representing 2 different tables, (eg) Employee and EmployeeDetails joined by emp_id, what will be setters/getters in the Employee class to persists details in both the tables? What if my employee details class has its own PK and emp_id is FK. How can this declaration be done?
 
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!