English 中文(简体)
当 FetchType 是 LAZY 时正在获取嵌套对象
原标题:Fetching nested objects when FetchType is LAZY

我正研究EclipseLink,并且出于性能原因,我们设置了PhetType.lazy, 不论我们在哪里有OneToMany关系。现在,该地点位于第1层,它也有其他商业逻辑,然后还有其他一些EAR,它使用第1层的定位。在获取这些物体时,我遇到了一个问题,因为ELipselink抛出了“类卡斯特”例外。对问题的略微调查表明,这是因为多耳的拉伸。

现在我的想法是用第1层来创建一种方法,这个方法将被其他耳朵称为 If they want to load the all the 物件, 即急切的装货装置。 我在想我怎样才能在日蚀链接中实现这个目标呢?

问题回答

EclipseLink defines load groups that allow relationships to be forced to be loaded. The copy API can also be used to force loading.

See, http://wiki.eclipse.org/EclipseLink/Examples/JPA/AttributeGroup

EARs不应该像你们现在这样依赖对方。你们要制造一大堆问题,用班级装载器来制造问题。

如果您有多个服务或网络应用程序来互动, 它们应该在同一耳边。 如果不是, 那么将普通的罐子文件复制到不同的耳朵 。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签