Grails: field access with GORM

2019-05-06 09:54发布

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

2条回答
甜甜的少女心
2楼-- · 2019-05-06 10:22

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

查看更多
乱世女痞
3楼-- · 2019-05-06 10:37

I suggest this is due to how groovy implements Beans convention therefore not something that can be configured for GORM.

查看更多
登录 后发表回答