摘要: 1.子类和父类的关系图: 2.Person,Student和Teacher类 3.映射文件 Person.hbm.xml文件 4.测试代码 5.测试结果 1.执行testSave()方法: 阅读全文
posted @ 2017-04-08 17:23 chxbar 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 1.子类和父类的关系图: 2.Person,Student和Teacher类 3.映射文件 Person.hbm.xml 映射文件理解: <!-- 指明鉴别器 --> <discriminator column="type" type="string"/> 4.测试代码 5.测试结果 1.执行tes 阅读全文
posted @ 2017-04-08 17:04 chxbar 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 1.Grade类和Student类: 2.映射文件 Grade.hbm.xml Student.hbm.xml 3.测试代码 4.测试结果 1.执行testSave()方法: 2.执行testGet()方法: 阅读全文
posted @ 2017-04-08 14:05 chxbar 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 1.Grade类 2.Student类 3.映射文件 Grade.hbm.xml Student.hbm.xml 4.测试代码 5.测试结果 1.执行testSave()方法: 2.执行testGet(): 阅读全文
posted @ 2017-04-08 11:32 chxbar 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 1.角色Role 和功能 Function 2.类Role 和Function类 3.映射文件 Role.hbm.xml function.hbm.xml 4.测试代码 5.测试结果 1.执行testSave() 控制台信息: 数据库表: 阅读全文
posted @ 2017-04-07 22:46 chxbar 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 1.角色Role 和功能 Function 2.类Role 和Function类 3. 映射文件 Role.hbm.xml function.hbm.xml【因为casecade=all,即所有操作都级联】 4.测试代码 5.测试结果 1.执行testCreateDB() 2.执行testSave( 阅读全文
posted @ 2017-04-07 22:31 chxbar 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 1.公民表person 和身份证 IdCard 2.类Person 和IdCard类 3.映射文件 IdCard.hbm.xml Person.hbm.xml 3.测试代码 4.测试结果 1.执行testSave()方法: 2.执行testGet()方法: 阅读全文
posted @ 2017-04-07 22:11 chxbar 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 1.公民表person和身份证表idcard 2.Person和IdCard类 3.映射文件 Person.hbm.xml IdCard.hbm.xml 4.测试代码【测试testSave()方法】 5.测试结果 1.运行testCreateDB()创建表时: 2.运行testSave()方法:【在 阅读全文
posted @ 2017-04-07 21:50 chxbar 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 1.公民表person 和身份证 IdCard 2.类Person 和IdCard类 3.配置文件 IdCard.hbm.xml Person.hbm.xml 4.测试代码【由上至下依次单元测试@Test】 5.测试结果 1.运行testSave()方法: 2.运行testGet()方法: 阅读全文
posted @ 2017-04-07 21:33 chxbar 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 1. 公民表person 和身份证 IdCard 2.类Person 和IdCard类 3.配置文件: IdCard.hbm.xml Person.hbm.xml 4.测试代码 5.测试结果 阅读全文
posted @ 2017-04-07 21:20 chxbar 阅读(144) 评论(0) 推荐(0) 编辑