本文介绍了Grails:与GORM进行现场访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hibernate默认使用方法调用来获取域类属性的值。如何配置GORM的直接字段访问?

解决方案

它不直接支持,但会在1.4。现在,您可以使用自定义配置子类启用它,如



我在


Hibernate uses method calls to get the values of domain class properties by default. How can I configure direct field access with GORM?

解决方案

It's not directly supported but will be in 1.4. For now you can enable it with a custom Configuration subclass as described at http://grails.1312388.n4.nabble.com/GORM-setting-access-quot-field-quot-td1592837.html#a1594428

I did a small post about subclassing Configuration with links to specific examples at http://burtbeckwith.com/blog/?p=465

这篇关于Grails:与GORM进行现场访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-16 08:46