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>
posted on 2007-04-10 14:31
周锐 阅读(388)
评论(1) 编辑 收藏 所属分类:
Hibernate