我如何在Grails中创建一个动态域类 [英] How can I create a dynamic domain class in Grails
本文介绍了我如何在Grails中创建一个动态域类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在Grails中创建一个动态域类。
假设我想创建一个新的域类,其类名和属性在运行时已知。如何在Grails中创建并保存它?
非常感谢, 解决方案
有一个插件: http://www.grails.org/plugin/动态域名类
How can I create a dynamic domain class in Grails.
Let's say I want to create a new domain class whose class name and properties is known in the run-time. How to create it and persist it in Grails?
Many thanks,
解决方案
There's a plugin for that: http://www.grails.org/plugin/dynamic-domain-class
这篇关于我如何在Grails中创建一个动态域类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文