| The output schema looks right. From Hibernate perspective, you want to have 4 FK:
- The first 2 will link Enity1 and Entity2 for the first pair
- The next 2 will link again Enity1 and Entity2 but for the second pair
Therefore, if you don't want to have this DB schema, you probably don't want to have that Domain Model as well. |