org.springframework.dao.DataIntegrityViolationException: could not insert:
[com.kuandai.t4.pojo.TroubleInfo];
nested exception is org.hibernate.exception.ConstraintViolationException: could not insert:
[com.kuandai.t4.pojo.TroubleInfo]
Caused by: org.hibernate.exception.ConstraintViolationException: could not insert:
[com.kuandai.t4.pojo.TroubleInfo]
问题原因:数据库中表有些非空字段没有给值
解决办法:在插入时,将表中要求的非空字段全部赋值后再插入
[com.kuandai.t4.pojo.TroubleInfo];
nested exception is org.hibernate.exception.ConstraintViolationException: could not insert:
[com.kuandai.t4.pojo.TroubleInfo]
Caused by: org.hibernate.exception.ConstraintViolationException: could not insert:
[com.kuandai.t4.pojo.TroubleInfo]
问题原因:数据库中表有些非空字段没有给值
解决办法:在插入时,将表中要求的非空字段全部赋值后再插入