Write operations are not allowed in read-only mode (FlushMode.MANUAL)
来源:互联网 发布:知乎如何修改问题 编辑:程序博客网 时间:2024/05/18 14:28
Hibernate使用过程中出现此类错误:Write operations are not allowed in read-only mode (FlushMode.MANUAL)
解决办法:
检查你的事务配置中的方法前缀是否和你现在使用的方法前缀一致,如果一致,需要修改你使用的方法前缀。
例如:
事务配置:
<tx:attributes>
<tx:method name="insert*" rollback-for="Exception" />
<tx:method name="update*" rollback-for="Exception" />
<tx:method name="delete*" rollback-for="Exception" />
<tx:method name="get*" read-only="true" />
<tx:method name="*" />
</tx:attributes>
方法:getProductPackId 建议修改前缀xxxProductPackId 主要是看你的事务配置哪一层了
0 0
- 错误:Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL)
- Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL): Turn your Session into
- Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into FlushM
- 错误:Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL)..
- Hibernate Write operations are not allowed in read-only mode (FlushMode.MANUAL)
- Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL): Turn your Session into
- Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL)..
- Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL)
- Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL): Turn your Session into
- Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn
- 错误:Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL)..
- Write operations are not allowed in read-only mode (FlushMode.MANUAL): 解决方法
- Write operations are not allowed in read-only mode (FlushMode.MANUAL):
- Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL)异常解决方法
- Write operations are not allowed in read-only mode (FlushMode.MANUAL)
- Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL)
- 解决Spring4+Hibernate4遇到的 Write operations are not allowed in read-only mode (FlushMode.MANUAL)
- Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into FlushM
- python缺包笔记
- mysql加密
- 怎样在Oracle 9i中正确的转换时区
- php中的访问修饰符知识点
- VS2010下编译sqlite3
- Write operations are not allowed in read-only mode (FlushMode.MANUAL)
- 最近一年多所做项目和使用到的技术 (移动互联、智能电视)
- php中构造方法知识点
- Android java.lang.NoClassDefFoundError:
- Swift编程语言入门视频教程(十七)--世界杯竞猜程序(4)
- 黑马程序员---交通灯管理系统
- tomcat和jboss 部署区别
- 离散数学之relations
- js 判断图片是否加载完