{"action":"closed","issue":{"url":"https://api.github.com/repos/grails/grails-data-mapping/issues/1059","repository_url":"https://api.github.com/repos/grails/grails-data-mapping","labels_url":"https://api.github.com/repos/grails/grails-data-mapping/issues/1059/labels{/name}","comments_url":"https://api.github.com/repos/grails/grails-data-mapping/issues/1059/comments","events_url":"https://api.github.com/repos/grails/grails-data-mapping/issues/1059/events","html_url":"https://github.com/grails/grails-data-mapping/issues/1059","id":295070320,"number":1059,"title":"unique:false constraints behaves like unique:true","user":{"login":"ilopmar","id":559192,"avatar_url":"https://avatars3.githubusercontent.com/u/559192?v=4","gravatar_id":"","url":"https://api.github.com/users/ilopmar","html_url":"https://github.com/ilopmar","followers_url":"https://api.github.com/users/ilopmar/followers","following_url":"https://api.github.com/users/ilopmar/following{/other_user}","gists_url":"https://api.github.com/users/ilopmar/gists{/gist_id}","starred_url":"https://api.github.com/users/ilopmar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilopmar/subscriptions","organizations_url":"https://api.github.com/users/ilopmar/orgs","repos_url":"https://api.github.com/users/ilopmar/repos","events_url":"https://api.github.com/users/ilopmar/events{/privacy}","received_events_url":"https://api.github.com/users/ilopmar/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"ilopmar","id":559192,"avatar_url":"https://avatars3.githubusercontent.com/u/559192?v=4","gravatar_id":"","url":"https://api.github.com/users/ilopmar","html_url":"https://github.com/ilopmar","followers_url":"https://api.github.com/users/ilopmar/followers","following_url":"https://api.github.com/users/ilopmar/following{/other_user}","gists_url":"https://api.github.com/users/ilopmar/gists{/gist_id}","starred_url":"https://api.github.com/users/ilopmar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilopmar/subscriptions","organizations_url":"https://api.github.com/users/ilopmar/orgs","repos_url":"https://api.github.com/users/ilopmar/repos","events_url":"https://api.github.com/users/ilopmar/events{/privacy}","received_events_url":"https://api.github.com/users/ilopmar/received_events","type":"User","site_admin":false},"assignees":[{"login":"ilopmar","id":559192,"avatar_url":"https://avatars3.githubusercontent.com/u/559192?v=4","gravatar_id":"","url":"https://api.github.com/users/ilopmar","html_url":"https://github.com/ilopmar","followers_url":"https://api.github.com/users/ilopmar/followers","following_url":"https://api.github.com/users/ilopmar/following{/other_user}","gists_url":"https://api.github.com/users/ilopmar/gists{/gist_id}","starred_url":"https://api.github.com/users/ilopmar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilopmar/subscriptions","organizations_url":"https://api.github.com/users/ilopmar/orgs","repos_url":"https://api.github.com/users/ilopmar/repos","events_url":"https://api.github.com/users/ilopmar/events{/privacy}","received_events_url":"https://api.github.com/users/ilopmar/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-02-07T09:49:26Z","updated_at":"2018-02-15T07:54:52Z","closed_at":"2018-02-15T07:54:52Z","author_association":"MEMBER","body":"`unique: false` in a domain class behaves like `unique: true`\r\n\r\n### Task List\r\n\r\n- [X] Steps to reproduce provided\r\n- [ ] Stacktrace (if present) provided\r\n- [X] Example that reproduces the problem uploaded to Github\r\n- [X] Full description of the issue provided (see below)\r\n\r\n### Steps to Reproduce\r\n\r\n1. Clone the sample repo and start the application\r\n2. Go to http://localhost:8080/test/index. The first time it works and the domain class is saved\r\n3. Go to http://localhost:8080/test/index. The second time it fails with unique validation error and the domain class is not saved.\r\n\r\n### Expected Behaviour\r\n\r\nThe domain class can be saved many times.\r\n\r\n### Actual Behaviour\r\n\r\nThe constraint behaves as `unique: true` so the domain object only can be saved once.\r\n\r\n### Environment Information\r\n\r\n- **Operating System**: Linux\r\n- **GORM Version:** 6.1.8\r\n- **Grails Version (if using Grails):** 3.3.2\r\n- **JDK Version:** 1.8\r\n\r\n### Example Application\r\n\r\nhttps://github.com/grails-core-issues-forks/grails-data-mapping-issue-1059\r\n\r\n"}}
{"actor":{"display_login":"ilopmar"}}