【发布时间】:2010-09-28 16:04:07
【问题描述】:
我有域类:
class Person {
static hasMany = [ items: Item ]
static fetchMode = [ items: 'eager' ]
String name
Set items
}
class Item {
static belongsTo = [ owner: Person ]
String name
}
如果我将static fetchMode = [ items: 'eager' ] 留在原处,那么调用getItems() 只会返回大约10% 的项目。如果我删除了 fetchMode,那么getItems() 会返回所有项目。知道为什么 Eager fetch 会导致检索不到所有存储的数据吗?
【问题讨论】:
-
请将您问题的答案分享为答案,然后接受答案,否则此问题将继续留在我们的“未回答问题”列表中。如果问题不再相关,请标记它以引起版主注意。