首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

Hibernate批量删除出现sql错误Connection is read-only. Queries leading . are not allowed

2012-11-01 
Hibernate批量删除出现sql异常Connection is read-only. Queries leading ... are not allowed在做批量删

Hibernate批量删除出现sql异常Connection is read-only. Queries leading ... are not allowed
在做批量删除时出现:
Connection is read-only. Queries leading to data modification are not allowed
检查代码,没有问题!
忽然想到spring配置文件上,是只读的!

<props>        <prop key="create*">PROPAGATION_REQUIRED,-com.worthtech.app.exception.SCException</prop>        <prop key="save*">PROPAGATION_REQUIRED,-com.worthtech.app.exception.SCException</prop>        <prop key="add*">PROPAGATION_REQUIRED,-com.worthtech.app.exception.SCException</prop>        <prop key="remove*">PROPAGATION_REQUIRED,-com.worthtech.app.exception.SCException</prop>        <prop key="update*">PROPAGATION_REQUIRED,-com.worthtech.app.exception.SCException</prop>        <prop key="del*">PROPAGATION_REQUIRED,-com.worthtech.app.exception.SCException</prop>        <prop key="*">PROPAGATION_REQUIRED,readOnly</prop>      </props>

把readOnly去掉就可以了

热点排行