当执行流程的结点时,出现错误,如下:
严重: Cannot delete or update a parent row: a foreign key constraint fails
2009-11-6 22:39:08 org.hibernate.event.def.AbstractFlushingEventListener performExecutions
严重: Could not synchronize database state with session
org.hibernate.exception.ConstraintViolationException: could not delete: [org.jbpm.pvm.internal.model.ExecutionImpl#1]
解决方法:
将jbpm.hibernate.cfg.xml文件中的org.hibernate.dialect.MySQLDialect改为org.hibernate.dialect.MySQLInnoDBDialect
本文介绍了一种常见数据库操作问题——外键约束导致的删除失败,并提供了解决方案。通过更改Hibernate配置文件中的方言设置,可以有效解决该问题。

被折叠的 条评论
为什么被折叠?



