An issue while creating multiple unique columns with GORM
问题 I have this Grails domain class: class MyClass { static auditable = true; String description; Boolean isActive=true; Date deletedAt; static constraints = { description size: 1..250, blank: false, unique:['deletedAt', 'isActive'], index:'myclass_idx' deletedAt nullable: true, index:'myclass_idx' isActive index:'myclass_idx' } } What I expect it to do is to create a constraint which won't allow duplicate records like these: id| description | is_active | deleted_at 1 | desc1 | true | (null) 2 |