摘要: 配置hibernate环境、 实体类 public class People { private Integer id; private String name; private IdCard idCard; public Integer getId() { return id; } public 阅读全文
posted @ 2019-11-15 22:33 Steven-Russell 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 单向一对一:通过控制单向多对一中多的一端唯一,有此便形成了单向一对一 配置hibernate环境配置 实体类 public class Student { private Integer id; private String name; private Teacher teacher; public 阅读全文
posted @ 2019-11-15 17:09 Steven-Russell 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 配置hibernate环境 实体类 package com.wd.pojo; public class Student { private Integer id; private String name; private Teacher teacher;//此处通过t_student中的tid列映射 阅读全文
posted @ 2019-11-15 16:49 Steven-Russell 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 配置hibernate环境(https://blog.csdn.net/weixin_43317111/article/details/103078545) 实体类 package com.wd.pojo; public class Student { private Integer id; pri 阅读全文
posted @ 2019-11-15 14:50 Steven-Russell 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 添加相关依赖 <properties> <hibernate-version>4.3.10.Final</hibernate-version> <mysql-version>5.1.30</mysql-version> </properties> <dependencies> <dependency 阅读全文
posted @ 2019-11-15 08:40 Steven-Russell 阅读(3) 评论(0) 推荐(0) 编辑