【发布时间】:2012-10-15 14:56:08
【问题描述】:
我有一个带有地图对象的 GORM 域类。
class MyClass {
Map<String, String> myMap
static constraints = { ... }
}
默认情况下,myMap 中的值不可为空。有没有办法配置约束,使 myMap 中的值可以为空?
【问题讨论】:
标签: grails map grails-orm nullable
我有一个带有地图对象的 GORM 域类。
class MyClass {
Map<String, String> myMap
static constraints = { ... }
}
默认情况下,myMap 中的值不可为空。有没有办法配置约束,使 myMap 中的值可以为空?
【问题讨论】:
标签: grails map grails-orm nullable
static constraints = {
myMap nullable: true
}
【讨论】: