I am now trying to make migration in Grails, and here is my domain class:
class SomeDomain {
String stringField
EnumClass enumField
static constraints = {
stringField nullable: true, maxSize: 100
enumField nullable: true, maxSize: 100
}
}
then if I auto generated diff groovy file,
It reflects the stringField's maxSize(100), but for enumField there are no constraints reflected such that it is of maxSize(255).
Does anyone know how to set enumField's maxSize?
question from:
https://stackoverflow.com/questions/66060629/grails-if-a-domain-has-enum-field-how-to-set-maxsize-constraint-to-it 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…