{"action":"opened","number":79,"pull_request":{"url":"https://api.github.com/repos/elasticquent/Elasticquent/pulls/79","id":69335931,"html_url":"https://github.com/elasticquent/Elasticquent/pull/79","diff_url":"https://github.com/elasticquent/Elasticquent/pull/79.diff","patch_url":"https://github.com/elasticquent/Elasticquent/pull/79.patch","issue_url":"https://api.github.com/repos/elasticquent/Elasticquent/issues/79","number":79,"state":"open","locked":false,"title":"Fix Relationship loading if there are no relationships found","user":{"login":"yswery","id":6571918,"avatar_url":"https://avatars.githubusercontent.com/u/6571918?v=3","gravatar_id":"","url":"https://api.github.com/users/yswery","html_url":"https://github.com/yswery","followers_url":"https://api.github.com/users/yswery/followers","following_url":"https://api.github.com/users/yswery/following{/other_user}","gists_url":"https://api.github.com/users/yswery/gists{/gist_id}","starred_url":"https://api.github.com/users/yswery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yswery/subscriptions","organizations_url":"https://api.github.com/users/yswery/orgs","repos_url":"https://api.github.com/users/yswery/repos","events_url":"https://api.github.com/users/yswery/events{/privacy}","received_events_url":"https://api.github.com/users/yswery/received_events","type":"User","site_admin":false},"body":"Currently we can successfully index a full collection with its respective relationships (some exist and some simply return `null) in laravel.\r\n\r\n\r\nHere we are adding small amount of checking and a fix for when we have indexed a relationship as a `null` value (as returned from laravel)\r\n\r\nexample: \r\n```\r\n>>> App\\Models\\SomeModel::with('relationship_name')->find(1231)\r\n\r\n=> App\\Models\\ASN {#831\r\n     id: 121,\r\n     name: \"Hello World\",\r\n     relationship_name: null\r\n   }\r\n\r\n```","created_at":"2016-05-09T12:15:40Z","updated_at":"2016-05-09T12:15:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/elasticquent/Elasticquent/pulls/79/commits","review_comments_url":"https://api.github.com/repos/elasticquent/Elasticquent/pulls/79/comments","review_comment_url":"https://api.github.com/repos/elasticquent/Elasticquent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elasticquent/Elasticquent/issues/79/comments","statuses_url":"https://api.github.com/repos/elasticquent/Elasticquent/statuses/f141abc27e2476f4f958e26f4a788920ad02d652","head":{"label":"yswery:master","ref":"master","sha":"f141abc27e2476f4f958e26f4a788920ad02d652","user":{"login":"yswery","id":6571918,"avatar_url":"https://avatars.githubusercontent.com/u/6571918?v=3","gravatar_id":"","url":"https://api.github.com/users/yswery","html_url":"https://github.com/yswery","followers_url":"https://api.github.com/users/yswery/followers","following_url":"https://api.github.com/users/yswery/following{/other_user}","gists_url":"https://api.github.com/users/yswery/gists{/gist_id}","starred_url":"https://api.github.com/users/yswery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yswery/subscriptions","organizations_url":"https://api.github.com/users/yswery/orgs","repos_url":"https://api.github.com/users/yswery/repos","events_url":"https://api.github.com/users/yswery/events{/privacy}","received_events_url":"https://api.github.com/users/yswery/received_events","type":"User","site_admin":false},"repo":{"id":58373031,"name":"Elasticquent-1","full_name":"yswery/Elasticquent-1","owner":{"login":"yswery","id":6571918,"avatar_url":"https://avatars.githubusercontent.com/u/6571918?v=3","gravatar_id":"","url":"https://api.github.com/users/yswery","html_url":"https://github.com/yswery","followers_url":"https://api.github.com/users/yswery/followers","following_url":"https://api.github.com/users/yswery/following{/other_user}","gists_url":"https://api.github.com/users/yswery/gists{/gist_id}","starred_url":"https://api.github.com/users/yswery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yswery/subscriptions","organizations_url":"https://api.github.com/users/yswery/orgs","repos_url":"https://api.github.com/users/yswery/repos","events_url":"https://api.github.com/users/yswery/events{/privacy}","received_events_url":"https://api.github.com/users/yswery/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yswery/Elasticquent-1","description":"Maps Laravel Eloquent models to Elasticsearch types","fork":true,"url":"https://api.github.com/repos/yswery/Elasticquent-1","forks_url":"https://api.github.com/repos/yswery/Elasticquent-1/forks","keys_url":"https://api.github.com/repos/yswery/Elasticquent-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yswery/Elasticquent-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yswery/Elasticquent-1/teams","hooks_url":"https://api.github.com/repos/yswery/Elasticquent-1/hooks","issue_events_url":"https://api.github.com/repos/yswery/Elasticquent-1/issues/events{/number}","events_url":"https://api.github.com/repos/yswery/Elasticquent-1/events","assignees_url":"https://api.github.com/repos/yswery/Elasticquent-1/assignees{/user}","branches_url":"https://api.github.com/repos/yswery/Elasticquent-1/branches{/branch}","tags_url":"https://api.github.com/repos/yswery/Elasticquent-1/tags","blobs_url":"https://api.github.com/repos/yswery/Elasticquent-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yswery/Elasticquent-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yswery/Elasticquent-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/yswery/Elasticquent-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yswery/Elasticquent-1/statuses/{sha}","languages_url":"https://api.github.com/repos/yswery/Elasticquent-1/languages","stargazers_url":"https://api.github.com/repos/yswery/Elasticquent-1/stargazers","contributors_url":"https://api.github.com/repos/yswery/Elasticquent-1/contributors","subscribers_url":"https://api.github.com/repos/yswery/Elasticquent-1/subscribers","subscription_url":"https://api.github.com/repos/yswery/Elasticquent-1/subscription","commits_url":"https://api.github.com/repos/yswery/Elasticquent-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/yswery/Elasticquent-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/yswery/Elasticquent-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/yswery/Elasticquent-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/yswery/Elasticquent-1/contents/{+path}","compare_url":"https://api.github.com/repos/yswery/Elasticquent-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yswery/Elasticquent-1/merges","archive_url":"https://api.github.com/repos/yswery/Elasticquent-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yswery/Elasticquent-1/downloads","issues_url":"https://api.github.com/repos/yswery/Elasticquent-1/issues{/number}","pulls_url":"https://api.github.com/repos/yswery/Elasticquent-1/pulls{/number}","milestones_url":"https://api.github.com/repos/yswery/Elasticquent-1/milestones{/number}","notifications_url":"https://api.github.com/repos/yswery/Elasticquent-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yswery/Elasticquent-1/labels{/name}","releases_url":"https://api.github.com/repos/yswery/Elasticquent-1/releases{/id}","deployments_url":"https://api.github.com/repos/yswery/Elasticquent-1/deployments","created_at":"2016-05-09T11:57:47Z","updated_at":"2016-05-09T11:57:49Z","pushed_at":"2016-05-09T12:14:28Z","git_url":"git://github.com/yswery/Elasticquent-1.git","ssh_url":"git@github.com:yswery/Elasticquent-1.git","clone_url":"https://github.com/yswery/Elasticquent-1.git","svn_url":"https://github.com/yswery/Elasticquent-1","homepage":"","size":115,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"elasticquent:master","ref":"master","sha":"579782dec4581b394db821e70d58558ad6aec247","user":{"login":"elasticquent","id":12946572,"avatar_url":"https://avatars.githubusercontent.com/u/12946572?v=3","gravatar_id":"","url":"https://api.github.com/users/elasticquent","html_url":"https://github.com/elasticquent","followers_url":"https://api.github.com/users/elasticquent/followers","following_url":"https://api.github.com/users/elasticquent/following{/other_user}","gists_url":"https://api.github.com/users/elasticquent/gists{/gist_id}","starred_url":"https://api.github.com/users/elasticquent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elasticquent/subscriptions","organizations_url":"https://api.github.com/users/elasticquent/orgs","repos_url":"https://api.github.com/users/elasticquent/repos","events_url":"https://api.github.com/users/elasticquent/events{/privacy}","received_events_url":"https://api.github.com/users/elasticquent/received_events","type":"Organization","site_admin":false},"repo":{"id":37637200,"name":"Elasticquent","full_name":"elasticquent/Elasticquent","owner":{"login":"elasticquent","id":12946572,"avatar_url":"https://avatars.githubusercontent.com/u/12946572?v=3","gravatar_id":"","url":"https://api.github.com/users/elasticquent","html_url":"https://github.com/elasticquent","followers_url":"https://api.github.com/users/elasticquent/followers","following_url":"https://api.github.com/users/elasticquent/following{/other_user}","gists_url":"https://api.github.com/users/elasticquent/gists{/gist_id}","starred_url":"https://api.github.com/users/elasticquent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elasticquent/subscriptions","organizations_url":"https://api.github.com/users/elasticquent/orgs","repos_url":"https://api.github.com/users/elasticquent/repos","events_url":"https://api.github.com/users/elasticquent/events{/privacy}","received_events_url":"https://api.github.com/users/elasticquent/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elasticquent/Elasticquent","description":"Maps Laravel Eloquent models to Elasticsearch types","fork":false,"url":"https://api.github.com/repos/elasticquent/Elasticquent","forks_url":"https://api.github.com/repos/elasticquent/Elasticquent/forks","keys_url":"https://api.github.com/repos/elasticquent/Elasticquent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elasticquent/Elasticquent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elasticquent/Elasticquent/teams","hooks_url":"https://api.github.com/repos/elasticquent/Elasticquent/hooks","issue_events_url":"https://api.github.com/repos/elasticquent/Elasticquent/issues/events{/number}","events_url":"https://api.github.com/repos/elasticquent/Elasticquent/events","assignees_url":"https://api.github.com/repos/elasticquent/Elasticquent/assignees{/user}","branches_url":"https://api.github.com/repos/elasticquent/Elasticquent/branches{/branch}","tags_url":"https://api.github.com/repos/elasticquent/Elasticquent/tags","blobs_url":"https://api.github.com/repos/elasticquent/Elasticquent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elasticquent/Elasticquent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elasticquent/Elasticquent/git/refs{/sha}","trees_url":"https://api.github.com/repos/elasticquent/Elasticquent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elasticquent/Elasticquent/statuses/{sha}","languages_url":"https://api.github.com/repos/elasticquent/Elasticquent/languages","stargazers_url":"https://api.github.com/repos/elasticquent/Elasticquent/stargazers","contributors_url":"https://api.github.com/repos/elasticquent/Elasticquent/contributors","subscribers_url":"https://api.github.com/repos/elasticquent/Elasticquent/subscribers","subscription_url":"https://api.github.com/repos/elasticquent/Elasticquent/subscription","commits_url":"https://api.github.com/repos/elasticquent/Elasticquent/commits{/sha}","git_commits_url":"https://api.github.com/repos/elasticquent/Elasticquent/git/commits{/sha}","comments_url":"https://api.github.com/repos/elasticquent/Elasticquent/comments{/number}","issue_comment_url":"https://api.github.com/repos/elasticquent/Elasticquent/issues/comments{/number}","contents_url":"https://api.github.com/repos/elasticquent/Elasticquent/contents/{+path}","compare_url":"https://api.github.com/repos/elasticquent/Elasticquent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elasticquent/Elasticquent/merges","archive_url":"https://api.github.com/repos/elasticquent/Elasticquent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elasticquent/Elasticquent/downloads","issues_url":"https://api.github.com/repos/elasticquent/Elasticquent/issues{/number}","pulls_url":"https://api.github.com/repos/elasticquent/Elasticquent/pulls{/number}","milestones_url":"https://api.github.com/repos/elasticquent/Elasticquent/milestones{/number}","notifications_url":"https://api.github.com/repos/elasticquent/Elasticquent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elasticquent/Elasticquent/labels{/name}","releases_url":"https://api.github.com/repos/elasticquent/Elasticquent/releases{/id}","deployments_url":"https://api.github.com/repos/elasticquent/Elasticquent/deployments","created_at":"2015-06-18T04:30:34Z","updated_at":"2016-05-08T14:08:13Z","pushed_at":"2016-05-07T17:58:06Z","git_url":"git://github.com/elasticquent/Elasticquent.git","ssh_url":"git@github.com:elasticquent/Elasticquent.git","clone_url":"https://github.com/elasticquent/Elasticquent.git","svn_url":"https://github.com/elasticquent/Elasticquent","homepage":"","size":147,"stargazers_count":184,"watchers_count":184,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":50,"mirror_url":null,"open_issues_count":27,"forks":50,"open_issues":27,"watchers":184,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elasticquent/Elasticquent/pulls/79"},"html":{"href":"https://github.com/elasticquent/Elasticquent/pull/79"},"issue":{"href":"https://api.github.com/repos/elasticquent/Elasticquent/issues/79"},"comments":{"href":"https://api.github.com/repos/elasticquent/Elasticquent/issues/79/comments"},"review_comments":{"href":"https://api.github.com/repos/elasticquent/Elasticquent/pulls/79/comments"},"review_comment":{"href":"https://api.github.com/repos/elasticquent/Elasticquent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elasticquent/Elasticquent/pulls/79/commits"},"statuses":{"href":"https://api.github.com/repos/elasticquent/Elasticquent/statuses/f141abc27e2476f4f958e26f4a788920ad02d652"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":4,"deletions":1,"changed_files":1}}