在 Grails/Gorm 中使用惰性属性获取 [英] Using lazy property fetching in Grails / Gorm

查看:19
本文介绍了在 Grails/Gorm 中使用惰性属性获取的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在 Grails/Gorm 中使用惰性属性获取?类似于:

is there any way to use lazy property fetching in Grails / Gorm ? somtehing like:

@Basic(fetch = FetchType.LAZY)

@Basic(fetch = FetchType.LAZY)

注解(它也适用于左连接获取?)

annotation ( it also works with left join fetch?)

(例如字符串属性的延迟加载)

(for example lazy loading of an String attribute)

推荐答案

这个问题在 grails-user 邮件列表 此处.讨论了几个不同的选项.

This question was asked on the grails-user mailing list here. There are a few different options discussed.

这篇关于在 Grails/Gorm 中使用惰性属性获取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆