Fixed unique constraint
Added test for GRAILS-9936
Merge pull request #107 from eugenypozharsky/GRAILS-9936

(GRAILS-9936) Fixed unique constraint