Hibernate Annotation的 *ToOne默认的FetchType是EAGER的
public class Entry{
...
@ManyToOne(targetEntity = User.class, fetch = FetchType.LAZY)
如果不加“fetch = FetchType.LAZY” 就会生成一个连表sql.
/**
* lazy load this property by proxy
*/
...
hibernate.AssertionFailure: collection was not processed by flush()
在把Compass2.0整合到应用程序中时遇到这样的错误。
其中Compass用来索引domain A, B.
A和B是一对多关系。
如下
Class A{
...
}
Class B{
private A a;
...
}
//在A,B的hbm文件中通过many-to-one 和 one-to-many关联。
在没有加入Compass之前,对这两个domain的查找,更新没有任何问题。
在加入Compass之后,对这两个dim ...
- 11:59
- 浏览 (85)
- 论坛浏览 (112)
- 评论 (0)
最新评论
-
sourceforge上不去了,什 ...
f u c k G FW
-- by openeyes -
Compass的SearchableRefe ...
晕,搜问题搜到自己这里了。。。
-- by NicholasBugs -
DispatchAction 和DynaVa ...
可以用MappingDispatchAction.
-- by dmewy -
spring struts velocity ...
找到一个方案:参照http://www.ibm.com/developerwor ...
-- by NicholasBugs -
spring struts velocity ...
这样的配置真啰嗦,还不如直接用spring MVC.
-- by slaser







评论排行榜