{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/10613","labels_url":"https://api.github.com/repos/laravel/framework/issues/10613/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/10613/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/10613/events","html_url":"https://github.com/laravel/framework/pull/10613","id":111607564,"number":10613,"title":"[5.1] Don't attempt to fetch relationships on the primary key","user":{"login":"kelvinj","id":31241,"avatar_url":"https://avatars.githubusercontent.com/u/31241?v=3","gravatar_id":"","url":"https://api.github.com/users/kelvinj","html_url":"https://github.com/kelvinj","followers_url":"https://api.github.com/users/kelvinj/followers","following_url":"https://api.github.com/users/kelvinj/following{/other_user}","gists_url":"https://api.github.com/users/kelvinj/gists{/gist_id}","starred_url":"https://api.github.com/users/kelvinj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kelvinj/subscriptions","organizations_url":"https://api.github.com/users/kelvinj/orgs","repos_url":"https://api.github.com/users/kelvinj/repos","events_url":"https://api.github.com/users/kelvinj/events{/privacy}","received_events_url":"https://api.github.com/users/kelvinj/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/laravel/framework/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/laravel/framework/labels/database","name":"database","color":"eb6420"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-15T12:37:23Z","updated_at":"2015-10-15T14:41:55Z","closed_at":"2015-10-15T14:41:55Z","pull_request":{"url":"https://api.github.com/repos/laravel/framework/pulls/10613","html_url":"https://github.com/laravel/framework/pull/10613","diff_url":"https://github.com/laravel/framework/pull/10613.diff","patch_url":"https://github.com/laravel/framework/pull/10613.patch"},"body":"I had an issue with an eloquent model where I had an `id()` getter method defined.\r\n\r\nWhen I associated this model with another through a belongsTo relationship, an exception would be thrown as it attempted to get the inverse relationship by the `otherKey` property, namely `id`."},"comment":{"url":"https://api.github.com/repos/laravel/framework/issues/comments/148407309","html_url":"https://github.com/laravel/framework/pull/10613#issuecomment-148407309","issue_url":"https://api.github.com/repos/laravel/framework/issues/10613","id":148407309,"user":{"login":"taylorotwell","id":463230,"avatar_url":"https://avatars.githubusercontent.com/u/463230?v=3","gravatar_id":"","url":"https://api.github.com/users/taylorotwell","html_url":"https://github.com/taylorotwell","followers_url":"https://api.github.com/users/taylorotwell/followers","following_url":"https://api.github.com/users/taylorotwell/following{/other_user}","gists_url":"https://api.github.com/users/taylorotwell/gists{/gist_id}","starred_url":"https://api.github.com/users/taylorotwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taylorotwell/subscriptions","organizations_url":"https://api.github.com/users/taylorotwell/orgs","repos_url":"https://api.github.com/users/taylorotwell/repos","events_url":"https://api.github.com/users/taylorotwell/events{/privacy}","received_events_url":"https://api.github.com/users/taylorotwell/received_events","type":"User","site_admin":false},"created_at":"2015-10-15T14:41:55Z","updated_at":"2015-10-15T14:41:55Z","body":"Eloquent doesn't support naming columns the same as methods on the model."}}