最新回答 / 進擊的小白菜
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