• Post Reply Bookmark Topic Watch Topic
  • New Topic

One to Many mappings in separate table help with mapping creation

 
Justin Howard
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have 2 tables in a relation of one to many mapping. but the mapping is in a separate table.
How can I create the hibernate mapping for this.

<table border="1">
<tr><td>username</td><td>password</td><td>person ID</td><tr>
<tr><td>ABC</td><td>abc</td><td>1</td><tr>
</table>


<table border="1">
<tr><td>Person ID</td><td>Principal ID</td><tr>
<tr><td>1</td><td>1</td><tr>
<tr><td>1</td><td>2</td><tr>
</table>



<table border="1">
<tr><td>Principal Name</td><td>Principal ID</td><tr>
<tr><td>Admin</td><td>1</td><tr>
<tr><td>Sales</td><td>2</td><tr>
</table>
 
What are you doing? You are supposed to be reading this 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!