org.springframework.dao.DataIntegrityViolationException: could not insert collection rows: [org.model.Xsb.kcs#081101 ]; nested exception is org.hibernate.exception.ConstraintViolationException: could not insert collection rows: [org.model.Xsb.kcs#081101 ]
org.hibernate.exception.ConstraintViolationException: could not insert collection rows: [org.model.Xsb.kcs#081101 ]
com.microsoft.sqlserver.jdbc.SQLServerException: 违反了 PRIMARY KEY 约束 'PK_XS_KCB'。不能在对象 'dbo.XS_KCB' 中插入重复键。
后来我又在主控表里加了inverse=“true”但由学生get()得到的关联set对象kcs为空