在用ssh做删除客户的同时删除联系人的时候会遇见这种异常:

HTTP Status 500 - could not execute statement; SQL [n/a]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement

could not execute statement; SQL [n/a]; constraint [null]级联删除异常

这是因为配置的时候没有在hbm.xml中写cascade=“delete"。正确写法:

could not execute statement; SQL [n/a]; constraint [null]级联删除异常








相关文章:

  • 2021-04-22
  • 2021-10-08
  • 2022-12-23
  • 2022-02-05
  • 2022-12-23
  • 2021-04-11
  • 2021-05-17
猜你喜欢
  • 2022-02-14
  • 2021-12-12
  • 2021-06-22
  • 2022-12-23
  • 2021-07-21
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案