更新时间:2022-01-18 09:36:53
我成功使用的另一种方法是将地图推送到协作者域类的集合中.
An alternative approach I used successfully was to push the map out into a collection of a collaborator domain class.
class DynaProperty {
String name
String value
static belongsTo = MyClass
static constraints = {
value(maxSize:4000) //Or whatever number is appropriate
}
}
然后在 MyClass 中:
And then in MyClass:
class MyClass {
static hasMany = [dynaProperties:DynaProperty]
}
这几乎是一张地图,它使您能够使用动态查找器来提取单个条目.
This is almost a map, and it gives you the ability to use dynamic finders to pull up an individual entry.