qq_40862003
Fudou-Akira
2020-02-18 01:16
采纳率: 100%
浏览 1.0k
已采纳

SpringBoot + MyBatis 内部实体类属性与数据库的对应关系

pojo 类

//部门表
    @Repository
public class Department {
    private Integer id;
    private String departmentName;

//员工表
public class Employee {
    private  Integer id;
    private  String name;
    private String email;
    private Integer gender;//0 女 1男
    private Department department;
    private Date birth;

员工表中有个属性为Department ,员工表中department列该如何设计

整合Mybatis 时 EmployeeMapper.xml department 属性与 数据库对应列关系hai能自动关联么

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

相关推荐