Hibernate中用proxy實現類的延遲加載

 能夠在 .xml 文件中指定 lazy=」true」 這個屬性來實現:   <class name="com.test.Student" table="student" lazy="true"> 這種方式等價於 <class name="com.test.Student" table="student" proxy="com.test.Student">   這樣 Hibernate 就會自動繼
相關文章
相關標籤/搜索