随笔分类 -  hibernate

摘要:只需要把关联类配置lazy='false',也就是立即加载例如:public class stu{ private int stuid;}public class score{ private stu s;}stu.cfg.xml把lazy='false' 阅读全文
posted @ 2014-12-03 23:59 单方面 阅读(202) 评论(0) 推荐(0)
摘要:tomcat里的conf->context.xmlhibernate.cfg.xml java:comp/env/mysql org.hibernate.dialect.MySQLDialect 使用Configuration cf=new Configuration(... 阅读全文
posted @ 2014-10-20 21:35 单方面 阅读(413) 评论(0) 推荐(0)