{"action":"created","issue":{"url":"https://api.github.com/repos/vuex-orm/vuex-orm/issues/157","repository_url":"https://api.github.com/repos/vuex-orm/vuex-orm","labels_url":"https://api.github.com/repos/vuex-orm/vuex-orm/issues/157/labels{/name}","comments_url":"https://api.github.com/repos/vuex-orm/vuex-orm/issues/157/comments","events_url":"https://api.github.com/repos/vuex-orm/vuex-orm/issues/157/events","html_url":"https://github.com/vuex-orm/vuex-orm/issues/157","id":323519161,"number":157,"title":"hasOne relationship not working, but belongsTo works","user":{"login":"Kleemer","id":5712094,"avatar_url":"https://avatars2.githubusercontent.com/u/5712094?v=4","gravatar_id":"","url":"https://api.github.com/users/Kleemer","html_url":"https://github.com/Kleemer","followers_url":"https://api.github.com/users/Kleemer/followers","following_url":"https://api.github.com/users/Kleemer/following{/other_user}","gists_url":"https://api.github.com/users/Kleemer/gists{/gist_id}","starred_url":"https://api.github.com/users/Kleemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kleemer/subscriptions","organizations_url":"https://api.github.com/users/Kleemer/orgs","repos_url":"https://api.github.com/users/Kleemer/repos","events_url":"https://api.github.com/users/Kleemer/events{/privacy}","received_events_url":"https://api.github.com/users/Kleemer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-05-16T08:31:46Z","updated_at":"2018-05-28T01:58:01Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\nI'm trying to use a simple hasOne relationship like this : **element** _hasOne_ **logic**.\r\nHowever sometimes the **logic** is null. When it's the case, the function HasOne.attach just does not work and it crashes. I then tried to put a **logic** _belongsTo_ **element** and it works correctly.\r\n\r\nAm I missing something ?\r\nThanks in advance for the help !\r\n\r\nEDIT : Using belongsTo doesn't work either, the **logic** entities are empty, my bad.\r\nIf I replace _hasOne_ by _hasMany_ on both my backend and my entities, it does not crash."},"comment":{"url":"https://api.github.com/repos/vuex-orm/vuex-orm/issues/comments/392399303","html_url":"https://github.com/vuex-orm/vuex-orm/issues/157#issuecomment-392399303","issue_url":"https://api.github.com/repos/vuex-orm/vuex-orm/issues/157","id":392399303,"user":{"login":"kiaking","id":3753672,"avatar_url":"https://avatars1.githubusercontent.com/u/3753672?v=4","gravatar_id":"","url":"https://api.github.com/users/kiaking","html_url":"https://github.com/kiaking","followers_url":"https://api.github.com/users/kiaking/followers","following_url":"https://api.github.com/users/kiaking/following{/other_user}","gists_url":"https://api.github.com/users/kiaking/gists{/gist_id}","starred_url":"https://api.github.com/users/kiaking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiaking/subscriptions","organizations_url":"https://api.github.com/users/kiaking/orgs","repos_url":"https://api.github.com/users/kiaking/repos","events_url":"https://api.github.com/users/kiaking/events{/privacy}","received_events_url":"https://api.github.com/users/kiaking/received_events","type":"User","site_admin":false},"created_at":"2018-05-28T01:58:01Z","updated_at":"2018-05-28T01:58:01Z","author_association":"CONTRIBUTOR","body":"Thanks for the investigation! Sorry I didn't had time to look into this just yet but I'll be soon!"}}
{"actor":{"display_login":"kiaking"}}