摘要: 三种状态的区分关键在于:有没有IDID在数据中有没有在内存中有没有(Session缓存)三种状态:transient :内存中有对象,没有ID,缓存中也没有persistent:内存中国有,缓存中有,数据库有(ID)detached:内存有,缓存没有,数据库有,ID 阅读全文
posted @ 2014-12-08 16:38 Mokaffe 阅读(131) 评论(0) 推荐(0) 编辑
摘要: Hibernate的configuration类:configuration类是用来加载hibernate配置文件的,默认的是读取hibernate.cfg.xml配置文件的信息。Configuration cfg = new Configuration().configure();//Confi... 阅读全文
posted @ 2014-12-08 16:02 Mokaffe 阅读(312) 评论(0) 推荐(0) 编辑