2008年9月4日 星期四

hibernate 關連

在hbm.xml使用many-to-one進行多對一關連
當被關連的對象是複合主鍵時,不可在many-to-one tag使用column attribute
只要在many-to-one tag下建立多個子column tag並一一指定name=主鍵欄位名稱即可
如圖:

1 則留言:

  1. well its nice to know that you have great hits here.

    回覆刪除