grails-core
grails-core copied to clipboard
Creating non-unique index in domain class create a unique and non-unique index
With grails 3.0.14 and mysql
Create a class like this
class Toto {
static constraints = {
}
static mapping = {
tata index:'tata_Idx', unique: 'false'
}
String tata
}
run grails and you will get two index in the database:
- tata_Idx ->INDEX
- UK_39dh1wvr5dfsp8bqsk9naxebp -> UNIQUE
Shouldn't unique: 'false' be unique: false? a String is not a boolean
Boolean works ! I cannot really tell when, but it use to work as a String :-)
thanks guys !