Win a copy of The Business Blockchain this week in the Cloud forum!
  • 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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic