Grails GORM:域映射值的可空约束

Grails GORM:域映射值的可空约束,grails,map,gorm,nullable,Grails,Map,Gorm,Nullable,我有一个带有map对象的GORM域类 class MyClass { Map<String, String> myMap static constraints = { ... } } class-MyClass{ 地图我的地图 静态约束={…} } 默认情况下,myMap中的值不可为空。有没有办法配置约束,使myMap中的值可以为空 static constraints = { myMap nullable: true } 请看这对我不起作用。我正在o

我有一个带有map对象的GORM域类

class MyClass {
    Map<String, String> myMap

    static constraints = { ... }
}
class-MyClass{
地图我的地图
静态约束={…}
}
默认情况下,myMap中的值不可为空。有没有办法配置约束,使myMap中的值可以为空

static constraints = {
    myMap nullable: true
}

请看

这对我不起作用。我正在oracle中使用Grails2.1.0。myMap.key可为空,但myMap.value不可为空。