主题 : 删除模型的时候出来这样的错误。。。
级别: 商业授权用户
UID: 78576
积分:209 加为好友
威望: 4 精华: 0
主题:24 回复:130
注册时间:2015-08-03
在线时长:0
1#   发表于:2015-08-28 16:00:14  IP:114.137.*.*
严重: Servlet.service() for servlet [JeeCmsAdmin] in context with path [/fm] threw exception [Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: Could not execute JDBC batch update; SQL [delete from jc_model where model_id=?]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update] with root cause
java.sql.BatchUpdateException: Cannot delete or update a parent row: a foreign key constraint fails (`fm_db`.`jc_channel`, CONSTRAINT `fk_jc_channel_model` FOREIGN KEY (`model_id`) REFERENCES `jc_model` (`model_id`))

这是什么原因?
能解决吗?
级别: 版主
UID: 70293
积分:78391 加为好友
威望: 1 精华: 0
主题:7 回复:68397
注册时间:2014-12-03
在线时长:0
2#   发表于:2015-08-28 16:01:24  IP:59.138.*.*
你要先删除引用了这个模型的栏目
1
级别: 商业授权用户
UID: 78576
积分:209 加为好友
威望: 4 精华: 0
主题:24 回复:130
注册时间:2015-08-03
在线时长:0
3#   发表于:2015-08-28 16:06:00  IP:114.137.*.*
现在好了。
但是为什么没提示这样的情况,只能出现“服务器错误”?
级别: 版主
UID: 70293
积分:78391 加为好友
威望: 1 精华: 0
主题:7 回复:68397
注册时间:2014-12-03
在线时长:0
4#   发表于:2015-08-28 16:08:34  IP:59.138.*.*
我这里是有提示的,可能你项目那有什么不一样的地方
1
1 共1页