主题 : 3.02版本删除栏目报错
级别: 童生
UID: 11244
积分:1 加为好友
威望: 0 精华: 0
主题:0 回复:1
注册时间:2010-09-25
在线时长:0
1#   发表于:2011-01-16 20:38:56  IP:124.187.*.*
删除栏目出错
0:35:11.390 ERROR org.hibernate.util.JDBCExceptionReporter - Cannot delete or update a parent row: a foreign key constraint fails (`jeecms_3_0_2_final`.`jc_content`, CONSTRAINT `fk_jc_contentchannel` FOREIGN KEY (`channel_id`) REFERENCES `jc_channel` (`channel_id`))
20:35:11.390 ERROR org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94) ~[hibernate-3.3.2.jar:na]
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) ~[hibernate-3.3.2.jar:na]
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275) ~[hibernate-3.3.2.jar:na]
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266) ~[hibernate-3.3.2.jar:na]
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:172) ~[hibernate-3.3.2.jar:na]
级别: 童生
UID: 11244
积分:1 加为好友
威望: 0 精华: 0
主题:0 回复:1
注册时间:2010-09-25
在线时长:0
2#   发表于:2011-01-16 20:45:09  IP:124.187.*.*
数据被引用,不能删除。
Could not execute JDBC batch update; SQL [delete from jc_channel where channel_id=?]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
级别: 童生
UID: 11244
积分:1 加为好友
威望: 0 精华: 0
主题:0 回复:1
注册时间:2010-09-25
在线时长:0
3#   发表于:2011-01-16 23:42:23  IP:124.187.*.*
内容是如何删除的?真删除还是假删除?看了看数据库,貌似是假删除。。是如何标记的,关联数据如何处理?、
级别: 童生
UID: 11244
积分:1 加为好友
威望: 0 精华: 0
主题:0 回复:1
注册时间:2010-09-25
在线时长:0
4#   发表于:2011-01-16 23:54:56  IP:124.187.*.*
知道原因了,是以为栏目和内容关联,但删除内容的时候,只是修改了一下标记:有1变成了3,到了内容回收站里去了,删除回收站,在删除栏目就可以了。。。不过太麻烦了。。能不能友好的提示下。。。。删除之前需要查询下。。
级别: 童生
UID: 11244
积分:1 加为好友
威望: 0 精华: 0
主题:0 回复:1
注册时间:2010-09-25
在线时长:0
5#   发表于:2011-01-17 00:00:03  IP:124.187.*.*
晕了,bug太多了
删除的栏目如果选择了浏览权限也是不能删除了,而且浏览权限选择后提交,但是再查看的时候是没有勾选的。。。。
级别: 童生
UID: 10739
积分:3 加为好友
威望: 0 精华: 0
主题:0 回复:3
注册时间:2010-09-08
在线时长:0
6#   发表于:2011-01-17 09:07:38  IP:59.244.*.*
感谢您提出的问题,我们会在稍后的版本添加更为友好的提示
1 共1页