How can I access GORM object properties in a Groov

2019-07-14 21:16发布

I used the Grails create-script command to create my own custom script for rendering source code artifacts based on a GORM domain object. I want to generate a command object that contains the properties of the domain object. I see the properties and methods on the GroovyScriptCommand and TemplateRenderer, but I can't tell how to get a reference to the domain object properties or how to render them in my scaffolding templates. I tried forClass(model.fullName) but it says ClassNotFounException. I also tried install-templates, but that command no longer installs templates that render any object properties.

0条回答
登录 后发表回答