开发者

List of all domain classes in Grails

开发者 https://www.devze.com 2022-12-27 21:32 出处:网络
how can I get a list of alle domain classes I use in my project? Somethi开发者_C百科ng like GORM.domains.list().Using

how can I get a list of alle domain classes I use in my project? Somethi开发者_C百科ng like GORM.domains.list().


Using

grailsApplication.getArtefacts("Domain")

you get a list of GrailsDomainClass instances that hold meta-information regarding the domain class. The domain class itself is returned by Calling getClazz(). In short:

grailsApplication.getArtefacts("Domain")*.clazz

returns a complete list of the existing domain classes.

0

精彩评论

暂无评论...
验证码 换一张
取 消