class Book {
String name
String author
static constraints = { name(nullable:true)
}
}
上記は機能しているようですが、複数のフィールドに制約を設定すると、サーバーが起動しません
class Book {
String name
String author
static constraints = { name(nullable:true) author(nullabe:false)
}
}
上記のコードで...私は以下の例外を取得します
原因:groovy.lang.MissingMethodException:メソッドの署名なし:org.codehaus.groovy.grails.validation.ConstrainedProperty.call()は引数タイプに適用可能:(org.codehaus.groovy.grails.validation.ConstrainedProperty)値:[org.codehau s.groovy.grails.validation.ConstrainedProperty@3343e5 [class com.nthdimenzion.domain.Book、author、class java.lang.String、{nulla ble = org.codehaus.groovy.grails.validation.NullableConstraint @ 1aea6e2 [false]}]]可能な解決策:com.nthdimenzionのwait()、any()、wait(long)、each(groovy.lang.Closure)、any(groovy.lang.Closure)、isUrl()。 domain.Book $ _ clinit _closure1.doCall(Book.groovy:16)at com.nthdimenzion.domain.Book $ _ clinit _closure1.doCall(Book.groovy)...23詳細
何か案は ?