摘要: 首先定义一个方法: 然后在所有菜单栏的点击事件里面调用该方法,例如: 阅读全文
posted @ 2019-09-17 16:58 错莫难瞒 阅读(1060) 评论(0) 推荐(0) 编辑
摘要: FiscalYearPeriod类: package com.cnblogs.hibernate_first; import java.util.Date; public class FiscalYearPeriod { private FiscalYearPeriodPK fiscalYearPe 阅读全文
posted @ 2018-01-29 16:14 错莫难瞒 阅读(366) 评论(0) 推荐(0) 编辑
摘要: 继承映射有3种情况: 1.单表继承:每颗继承树使用一个表 table per class hierarchy 2.具体表继承:每个子类一个表 table per subclass 3.类表继承:每个具体类一个表 table per concrete class 有部分限制, 以下,类表继承: 1.A 阅读全文
posted @ 2018-01-26 16:51 错莫难瞒 阅读(281) 评论(0) 推荐(0) 编辑
摘要: 继承映射有3种情况: 1.单表继承:每颗继承树使用一个表 table per class hierarchy 2.具体表继承:每个子类一个表 table per subclass 3.类表继承:每个具体类一个表 table per concrete class 有部分限制, 以下,具体表继承: 1. 阅读全文
posted @ 2018-01-26 16:46 错莫难瞒 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 继承映射有3种情况: 1.单表继承:每颗继承树使用一个表 table per class hierarchy 2.具体表继承:每个子类一个表 table per subclass 3.类表继承:每个具体类一个表 table per concrete class 有部分限制, 以下,单表继承 Anim 阅读全文
posted @ 2018-01-25 14:52 错莫难瞒 阅读(174) 评论(0) 推荐(0) 编辑
摘要: Role类: package com.cnblogs.hibernate_first; import java.util.Set; public class Role { private int id; private String name; private Set users; public S 阅读全文
posted @ 2018-01-25 10:36 错莫难瞒 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Role类 User类 package com.cnblogs.hibernate_first; import java.util.Set; public class User { private int id; private String name; private Set roles; pub 阅读全文
posted @ 2018-01-23 10:22 错莫难瞒 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 跟单向关联仅有几处不同: 1从多的一方加入新的属性 2修改xml文件.Classes.hbm.xml 3,修改Student.hbm.xml文件 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-mapping PUBLIC "-/ 阅读全文
posted @ 2017-10-27 16:24 错莫难瞒 阅读(554) 评论(0) 推荐(0) 编辑
摘要: Classes类: Student: classes.hbm.xml student.hbm.xml: 测试类: hibernate 一对多的关联映射(单向 Classes ——》Student)hibernate对Set进行了扩展,可以延时加载,在需要的时候才需要查询SET。比如有1000个学生, 阅读全文
posted @ 2017-10-27 16:22 错莫难瞒 阅读(144) 评论(0) 推荐(0) 编辑
摘要: hibernate的一对一唯一外键关联映射(双向关联 Person < >IdCard)一对一唯一外键关联采用<one - to -one>标签映射,必须指定标签中的property—ref = 属性为关系字段的名称。 如下: 阅读全文
posted @ 2017-10-21 14:54 错莫难瞒 阅读(251) 评论(0) 推荐(0) 编辑