1.HibernateFactory的JUNIT通不过

问题解决:hibernate.cfg.xml中实体类配置文件的mapping写错了(mapping中要写实体类的*.hbm.xml所在的路径,要小心,千万不要写错).

 

2.HibernateFactory配置后,StudentDaoImp中的add()不能实现(student(gender,polity,id,birth,brief)继承自Account(name,password)),

添加用户时name,password插入不成功

问题解决:把父类中的私有属性写入到子类的xml文件可以解决,原理不明

参考:http://langgufu.iteye.com/blog/1552304

 

3.异常javax.naming.NoInitialContextException:

未解决

 

4.Object的三种状态transient,persistent,detached

问题解决:基本了解

 

5.hibernate中的映射关系

问题解决:理解并会应用了one-to-one(外键,主键形式暂不理解)many-to-one和one-to-many。many-to-many暂切搁置。

6.MappingException提示Association references unmapped class错误的解决方法

问题解决:参考http://www.itzhai.com/mappingexception-tips-association-references-unmapped-class-error-solution.html

posted on 2012-08-06 19:19  Death_Fat  阅读(77)  评论(0)    收藏  举报