小编kuz*_*uzo的帖子

Grails 中包含惰性和非惰性属性的缓存

Grails 文档指出,

class Person {
    ..
    static mapping = {
        table 'people'
        cache true
    }
}
Run Code Online (Sandbox Code Playgroud)

“将配置一个‘读写’缓存,其中包括惰性和非惰性属性。”

如果我们在 Person 中有一对多关系,例如:

static hasMany = [addressess: Address]
Run Code Online (Sandbox Code Playgroud)

grails 是否将其视为惰性属性?Address 对象是否也被缓存,或者只有与给定 Person 相关的 id 被保留在缓存中?

orm grails hibernate ehcache associations

2
推荐指数
1
解决办法
739
查看次数

标签 统计

associations ×1

ehcache ×1

grails ×1

hibernate ×1

orm ×1