{"action":"opened","issue":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/5550","repository_url":"https://api.github.com/repos/jhipster/generator-jhipster","labels_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/5550/labels{/name}","comments_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/5550/comments","events_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/5550/events","html_url":"https://github.com/jhipster/generator-jhipster/issues/5550","id":219866265,"number":5550,"title":"Unique constraint added for one-to-one relationship (owner)","user":{"login":"vambo","id":771745,"avatar_url":"https://avatars2.githubusercontent.com/u/771745?v=3","gravatar_id":"","url":"https://api.github.com/users/vambo","html_url":"https://github.com/vambo","followers_url":"https://api.github.com/users/vambo/followers","following_url":"https://api.github.com/users/vambo/following{/other_user}","gists_url":"https://api.github.com/users/vambo/gists{/gist_id}","starred_url":"https://api.github.com/users/vambo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vambo/subscriptions","organizations_url":"https://api.github.com/users/vambo/orgs","repos_url":"https://api.github.com/users/vambo/repos","events_url":"https://api.github.com/users/vambo/events{/privacy}","received_events_url":"https://api.github.com/users/vambo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-06T11:22:13Z","updated_at":"2017-04-06T11:22:13Z","closed_at":null,"body":"* **Overview of the request**\r\n\r\nI see that by default a unique constraint is added to the column for the owner side of the one-to-one relation, and I have tracked it down to the following commit:\r\n\r\nhttps://github.com/jhipster/generator-jhipster/commit/528b0ecb0c453ce7dbad5961651943209afe02e9\r\n* **Motivation for or Use Case** \r\n\r\n<!-- explain why this is a required for you -->\r\n\r\nTake for example a two-player game, where there could be two one-to-one relationships from Game to Team: e.g. homeTeam and awayTeam. It should be possible for either team to be added to more than one game, which the unique constraint would prohibit currently.\r\n\r\nCould someone at least explain the background of the current logic to me, maybe I am missing something?\r\n\r\n* **Browsers and Operating System** \r\n\r\n* **Related issues** \r\n\r\n* **Suggest a Fix** \r\n\r\nRemoving the unique constraint (or making it optional)"}}
{"actor":{"display_login":"vambo"}}