Payment.java
private Set<Subscription> subscriptions = new HashSet<Subscription>(0);
Subscription.java
private Set<Payment> payments = new HashSet<Payment>(0);
Payment.hbm.xml
<set name="subscriptions" table="subscriptionpayment" inverse="false"
cascade="none">
<key>
<column name="PaymentID" />
</key>
<many-to-many class="com.test.eric.model.Subscription">
<column name="SubscriptionID" />
</many-to-many>
</set>
Subscription.hbm.xml
<set name="payments" table="subscriptionpayment" inverse="false"
cascade="none">
<key>
<column name="SubscriptionID" />
</key>
<many-to-many class="com.test.eric.model.Payment">
<column name="PaymentID" />
</many-to-many>
</set>