org.hibernate.lazyinitialization异常(org.hibernate.lazyinitialization exception)
org.hibernate.LazyInitializationException:未能懒惰地初始化角色集合:pojo.Person.address,没有会话或会话已关闭。
我得到这个异常,我正在使用Spring 3.0和Hibernate 3.6。
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: pojo.Person.address, no session or session was closed.
I am getting this exception and I'm using Spring 3.0 and Hibernate 3.6.
原文:https://stackoverflow.com/questions/8292820
更新时间:2022-07-18 12:07
最满意答案
您必须单击“全部”选项卡。 如果你看一下你的照片,你就是“基本”,切换到“全部”就可以了。
You have to click on "ALL" tab. If you take a look to your picture, you're on "Basic", switching to "ALL" should do the trick.
相关问答
更多-
找到解决方案: “目标C桥接头”设置(又名SWIFT_OBJC_BRIDGING_HEADER )必须设置在目标级别,而不是项目级别。 确保在项目级别删除设置值。 (对我来说,它似乎是一个Xcode的错误,因为我不知道为什么它修复它)。 Found a solution: The "Objective-C Bridging Header" setting (aka SWIFT_OBJC_BRIDGING_HEADER) must be set at the Target level, and NOT the ...
-
Firebase升级后无法在Xcode中导入桥接头文件(Failed to import bridging header file in Xcode after Firebase Upgrade)[2019-10-13]
从Firebase迁移API : 更换该行: pod 'Firebase' 同 pod 'Firebase/Core' pod 'Firebase/Database' 并在项目文件夹中运行pod update From Firebase migration API: Replace the line: pod 'Firebase' with pod 'Firebase/Core' pod 'Firebase/Database' and run pod update in the project fo ... -
您应该更改分段控制选项。 它目前是定制的,因此它只会显示您自己更改的设置。 将其设置为全部。 You should change the segmented control option. It's customized at the moment, so it will only show the settings you changed yourself. Set it to All.
-
您需要更新项目构建设置中的路径以指向新的桥接标头位置。 点击你的目标,然后点击“构建设置”,然后搜索Objective-C Bridging Header I tried with Xcode6.1-Beta, as well. But still impossible to update the objective-c header path. I don't know where the configuration file is. I gave up to figure out. Finally, I ...
-
我设法在文本编辑器(Sublime)中打开Xcode项目文件,并将其与新项目进行比较。 复制参考两次,用于调试和发布,这是有效的! I managed to open the Xcode project file in a text editor (Sublime) and compared it with a new project. Copied the reference twice, for debug and release and that worked!
-
我的解决方案是: 不要在桥接头文件中导入ObjC框架,只需在需要框架的文件中导入框架。 就像: import xxxframework My solution is : Do not import the ObjC framework in bridging header file, just import the framework in the files in which the framework is needed. just like: import xxxframework
-
您必须单击“全部”选项卡。 如果你看一下你的照片,你就是“基本”,切换到“全部”就可以了。 You have to click on "ALL" tab. If you take a look to your picture, you're on "Basic", switching to "ALL" should do the trick.
-
import "Sonic-Swift.h" 应该只在.m文件中。 如果你想在.h文件中使用Swift类,那么你应该使用 @class MySwiftClass; import "Sonic-Swift.h" should be in .m file only. If you want to use Swift class in .h file then you should use @class MySwiftClass;
-
问题是你的enum是在 @interface中定义的 虽然这在Objective-C中是有效的,但它似乎从Swift中隐藏了它(我不确定这是否有意 - 肯定想知道是否有其他人知道更多关于这一点)。 因此,您可以通过移动@interface外部的枚举来修复它。 #import "PCFCategory.h" /** * Enum that describes the type of Category, used in BBSubMenuViewController and PCFCategoryMap+ ...
-
桥接头文件无法找到导入的Objective-C项目(Bridging Header File can't find an imported Objective-C project)[2022-08-06]
您应该尝试使用'cocoapods'安装库 手动导入项目时可能出现问题。 这是一个关于如何在您的应用程序中安装Cocospods并初始化podfile的教程。 然后,您可以在pod 'SCRecorder'添加pod 'SCRecorder'并返回终端并键入pod install 。 这将安装SCRecorder的所有依赖库。 最后,去尝试运行构建。 它应该工作。 安全方面,保留此构建的备份。 祝你好运 :) OK. I figured it out. I just didn't use the *.xcw ...