1.单向一对多(@OneToMany)关联是比较少用的(一般用双向一对多代替). 2.实体类: 1端:Publishers.java public class Publishers { private Integer id; private String Name; //集合属性 private Set bks = new HashSet<>(); //忽略getter和setter方法 ... } n端:Books.java public class Books { private Inte…