jeecms 数据被引用,不能删除。解决办法

数据被引用,不能删除。数据库

Could not execute JDBC batch update; SQL [update jc_channel_model set tpl_content=?, model_id=? where channel_id=? and priority=?]; nested exception is org.hibernate.exception.DataException: Could not execute JDBC batch updatespa

 

解决方法hibernate

1先查看回收站里的数据是否是没有清空(通常都不是这个形成的)。orm

2由于“jc_channel_model”表里面的文件引用了你要删除记录的主键了。到jc_channel_model表里,找到tpl_content字段里有值的,而且其值为你要删除的数据id,删掉就好了。it

附图说明io

 

 

 

()我要修改【理论&实践】栏目下的【创新思想】栏目后台

 

 

(二)、修改完毕——点击提交——报“数据被引用,不能删除。date

(三)、下面我就要注意了===如图exception

 

SQL [update jc_channel_model set tpl_content=?, model_id=? where channel_id=? and priority=?]model

这条SQL是告诉咱们不少信息,我来解读一下

他要更新jc_channel_modeltpl_content字段 发现出了问题。

咱们就直接去数据库中查找jc_channel_model如图

 

SELECT * FROM jc_channel_model

找到咱们要修改的栏目编号如图

 

 

对应的数据清空保存就解决上述问题

 

也能够经过后台的“维护”——>“附件管理” 进行删除操做。(本人不推荐,建议不要使用,由于不能决定定位)

相关文章
相关标签/搜索