Grails: accessing fields with GORM

Hibernate uses method calls to get the default values ​​for the properties of a domain class. How to configure direct access to fields using GORM?

+4
source share
2 answers

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

I made a small entry about subclassing the configuration with links to specific examples at http://burtbeckwith.com/blog/?p=465

+2
source

I suggest that this is due to the fact that groovy implements the Beans agreement , so it cannot be configured for GORM.

0
source

Source: https://habr.com/ru/post/1337769/


All Articles