最新回答 / 进击的小白菜
Caused by: org.hibernate.MappingException: Repeated column in mapping for entity: com.hellojava.entity.Student column: cid (should be mapped with insert="false" update="false")<...code...>不明白为什么 必须添加 &upd!-- insert="false" up...
2016-12-05
已采纳回答 / 阳光洒在路上就不怕心碎f
不可以的,班级表中gid是主键,作为学生表中的外键,外键可以为空也可以不为空,但是当外键是另一个表中的主键时,是不允许为空的,所以在先插入学生表,班级字段为空时不可以的。<...code...>
2016-11-28
最赞回答 / loader
ServiceRegistry serviceRegistry = new ServiceRegistryBuilder().applySettings(config.getProperties()).buildServiceRegistry(); 用这个
2016-11-22
已采纳回答 / 希冀yxb
Grade的类里的set集合没有实例化 把private Set<Student> students;改为private Set<Student> students=new HashSet<>();就好了
2016-11-09