还是做Many-to-One的时候遇见的错误,级联检索不允许。
试验了一下发现了几个解决方法:
1、是把对应一对多的那两个列lazy=true改为lazy=false即可
2、对于查询中如果用的是xxx.load(class,id)则改为xxx,get(class,id)
3在web.xml文件中加入
<filter>
<filter-name>hibernateFilter</filter-name>
<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
<init-param>
<param-name>singleSession</param-name>
<param-value>false</param-value>
</init-param>
<!--这个-- <init-param>一定要加不然很可能会报错:org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (FlushMode.NEVER) - turn your Session into FlushMode.AUTO or remove 'readOnly' marker from transaction definition
>
</filter>
<filter-mapping>
<filter-name>hibernateFilter</filter-name>
<url-pattern>*.mmg</url-pattern>
</filter-mapping>
分享到:
相关推荐
"checking out paths out of the index and/or a tree-ish to work on advancing the current history" out of the single "git checkout" command. * "git branch --list" learned to always output the ...
- **Context**: Context in computing refers to the specific environment or settings under which a particular operation occurs. This includes variables, registers, and other resources that the running ...
lazily. Copyright (c) 2009 Armando Blancas. All rights reserved. The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ...
/ Errrrr...Actually, I hesitate to release the source code of this control, / Because when I checked after completion, I found that it's really ugly! Putting all / graphic codes in the CDraw class ...
npm install --save react-lazily-render 用法 () import React from 'react' ; import LazilyRender from 'react-lazily-render' ; ...lots of content... < LazilyRender xss=removed> } content = { ...
- **Setting a reference using the members of other objects and classes**:演示了如何通过其他对象或类的成员设置引用。 - **Provided IFactoryObject implementations**:列出了一些预定义的`IFactoryObject`...
Apply the core principles of concurrency to both browser and server side development Explore the latest tools and techniques at the forefront of concurrent programming, including JavaScript promises, ...
- 完成句子练习可以帮助巩固词汇的应用,如:"The young man rose lazily and was not willing to greet us."(年轻人懒洋洋地起身,并不愿意向我们打招呼。),"This appointment was greeted with relief."(这个...
`lazily`:金鱼慵懒地(lazily)成群结队地在水面下游动。 - 15. `coats`:他们给前门刷了三层(coats)油漆。 2. **关键短语或词组**: - 1. `come along`:一起来,过来。 - 2. `a novel called…`:一本叫做...
- **Easier configuration of declarative transactions in XML**: 在XML配置中简化了声明式事务的配置。 - **JPA**: 支持Java Persistence API,为持久化层提供了一致性的API接口。 - **Asynchronous JMS**: 提供...
懒惰地ReactIMG React Lazily IMG是一个React Wrapper组件,用于延迟加载图像。 目标是使用方便且已知的标准HTML标记,并只是延迟加载它们。特征图片标签和IMG srcset支持Webp检测占位符HTML && CSS图像支持下载图像...
KOtlin DEpendency INjection Kodein is a very simple and yet very useful dependency ...Easily bind classes or interfaces to their instance or provider Easily debug your dependency bindings and rec
Exporting a lazily initialized bean (which implements SelfNaming and is annotated with ManagedResource annotation) gives IllegalStateException [SPR-17592] #22124 MockHttpServletRequest changes Accept-...
Table of Contents Preface What this book covers What you need for this book Running a Jupyter Notebook Who this book is for How to get the most out of this book Conventions Assumptions for every ...
(In this paper, by the statistical analysis of the path, source and moving velocity of the cold air, blocking high on the north of Baikal and Yakutsk was shown to be the main system of influence.)。...
- "more or less"意为"或多或少","no less than"表示"绝不少于,多达"。 - "teaspoonful"指的是"一满茶匙"的量,如"a teaspoonful of tea"。 - "pity"表示"遗憾",感叹句中可使用"What a pity!"表达惊讶或惋惜。...
// Subscribes to a Pub/Sub channel using the internal, lazily initialized SubscriberClient redis.subscriber.subscribe("My Channel") { case message @ PubSubMessage.Message(channel, ...
获取所有文件 具有延迟同步和异步迭代器支持的出色的快速递归目录搜寻器。 安装 支持Node.js版本10及更高版本。 $ npm i get-all-files ...path/to/dir/or/file` ) ) { // Could break early on some condition a
- **Lazily-Instantiated Beans**:介绍了延迟加载Bean的概念,即在真正需要的时候才加载Bean实例。 - **Autowiring Collaborators**:通过autowire属性自动装配Bean之间的依赖关系。 - **Checking for Dependencies...
3. 冠词:"a good worker",不定冠词a用于表示泛指,此处表示“一个好工人”。 4. 形容词与过去分词的区别:"Although surprised",形容词surprised用于表示人的感受。 5. 连词:"because he really needed help",...