{"action":"closed","number":106,"pull_request":{"url":"https://api.github.com/repos/js-data/js-data/pulls/106","id":32606954,"html_url":"https://github.com/js-data/js-data/pull/106","diff_url":"https://github.com/js-data/js-data/pull/106.diff","patch_url":"https://github.com/js-data/js-data/pull/106.patch","issue_url":"https://api.github.com/repos/js-data/js-data/issues/106","number":106,"state":"closed","locked":false,"title":"loadRelations: check params.where instead when allowSimpleWhere is disabled","user":{"login":"maninga","id":234938,"avatar_url":"https://avatars.githubusercontent.com/u/234938?v=3","gravatar_id":"","url":"https://api.github.com/users/maninga","html_url":"https://github.com/maninga","followers_url":"https://api.github.com/users/maninga/followers","following_url":"https://api.github.com/users/maninga/following{/other_user}","gists_url":"https://api.github.com/users/maninga/gists{/gist_id}","starred_url":"https://api.github.com/users/maninga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maninga/subscriptions","organizations_url":"https://api.github.com/users/maninga/orgs","repos_url":"https://api.github.com/users/maninga/repos","events_url":"https://api.github.com/users/maninga/events{/privacy}","received_events_url":"https://api.github.com/users/maninga/received_events","type":"User","site_admin":false},"body":"Hi,\r\n\r\nyou are doing a really great job with this project, thank you !\r\n\r\nI encounter a problem when using loadRelations with allowSimpleWhere disabled, so I try my best to send you a test case with a PR.\r\n\r\nWithout this, the .findAll is never reached.\r\n\r\nI also recommend setting `params.where` like this:\r\n\r\n`params.where[def.foreignKey] = instance[definition.idAttribute];`\r\n\r\ninstead of \r\n\r\n`params.where[def.foreignKey] = { '==': instance[definition.idAttribute] };`\r\n\r\nbecause the former is a common syntax to use server side and will still be handled by your defaultFilter function browser side. Please let me know if it is not right.\r\n\r\nRegards.","created_at":"2015-04-03T18:32:53Z","updated_at":"2015-04-03T19:03:41Z","closed_at":"2015-04-03T19:03:41Z","merged_at":null,"merge_commit_sha":"186b76a8ef1eecd4dffe066537261427a60601ad","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/js-data/js-data/pulls/106/commits","review_comments_url":"https://api.github.com/repos/js-data/js-data/pulls/106/comments","review_comment_url":"https://api.github.com/repos/js-data/js-data/pulls/comments{/number}","comments_url":"https://api.github.com/repos/js-data/js-data/issues/106/comments","statuses_url":"https://api.github.com/repos/js-data/js-data/statuses/27c5f4f5020739429bb4b3b2123b340f1a5cf92d","head":{"label":"maninga:master","ref":"master","sha":"27c5f4f5020739429bb4b3b2123b340f1a5cf92d","user":{"login":"maninga","id":234938,"avatar_url":"https://avatars.githubusercontent.com/u/234938?v=3","gravatar_id":"","url":"https://api.github.com/users/maninga","html_url":"https://github.com/maninga","followers_url":"https://api.github.com/users/maninga/followers","following_url":"https://api.github.com/users/maninga/following{/other_user}","gists_url":"https://api.github.com/users/maninga/gists{/gist_id}","starred_url":"https://api.github.com/users/maninga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maninga/subscriptions","organizations_url":"https://api.github.com/users/maninga/orgs","repos_url":"https://api.github.com/users/maninga/repos","events_url":"https://api.github.com/users/maninga/events{/privacy}","received_events_url":"https://api.github.com/users/maninga/received_events","type":"User","site_admin":false},"repo":{"id":33372189,"name":"js-data","full_name":"maninga/js-data","owner":{"login":"maninga","id":234938,"avatar_url":"https://avatars.githubusercontent.com/u/234938?v=3","gravatar_id":"","url":"https://api.github.com/users/maninga","html_url":"https://github.com/maninga","followers_url":"https://api.github.com/users/maninga/followers","following_url":"https://api.github.com/users/maninga/following{/other_user}","gists_url":"https://api.github.com/users/maninga/gists{/gist_id}","starred_url":"https://api.github.com/users/maninga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maninga/subscriptions","organizations_url":"https://api.github.com/users/maninga/orgs","repos_url":"https://api.github.com/users/maninga/repos","events_url":"https://api.github.com/users/maninga/events{/privacy}","received_events_url":"https://api.github.com/users/maninga/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maninga/js-data","description":"Robust framework-agnostic in-memory data store.","fork":true,"url":"https://api.github.com/repos/maninga/js-data","forks_url":"https://api.github.com/repos/maninga/js-data/forks","keys_url":"https://api.github.com/repos/maninga/js-data/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maninga/js-data/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maninga/js-data/teams","hooks_url":"https://api.github.com/repos/maninga/js-data/hooks","issue_events_url":"https://api.github.com/repos/maninga/js-data/issues/events{/number}","events_url":"https://api.github.com/repos/maninga/js-data/events","assignees_url":"https://api.github.com/repos/maninga/js-data/assignees{/user}","branches_url":"https://api.github.com/repos/maninga/js-data/branches{/branch}","tags_url":"https://api.github.com/repos/maninga/js-data/tags","blobs_url":"https://api.github.com/repos/maninga/js-data/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maninga/js-data/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maninga/js-data/git/refs{/sha}","trees_url":"https://api.github.com/repos/maninga/js-data/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maninga/js-data/statuses/{sha}","languages_url":"https://api.github.com/repos/maninga/js-data/languages","stargazers_url":"https://api.github.com/repos/maninga/js-data/stargazers","contributors_url":"https://api.github.com/repos/maninga/js-data/contributors","subscribers_url":"https://api.github.com/repos/maninga/js-data/subscribers","subscription_url":"https://api.github.com/repos/maninga/js-data/subscription","commits_url":"https://api.github.com/repos/maninga/js-data/commits{/sha}","git_commits_url":"https://api.github.com/repos/maninga/js-data/git/commits{/sha}","comments_url":"https://api.github.com/repos/maninga/js-data/comments{/number}","issue_comment_url":"https://api.github.com/repos/maninga/js-data/issues/comments{/number}","contents_url":"https://api.github.com/repos/maninga/js-data/contents/{+path}","compare_url":"https://api.github.com/repos/maninga/js-data/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maninga/js-data/merges","archive_url":"https://api.github.com/repos/maninga/js-data/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maninga/js-data/downloads","issues_url":"https://api.github.com/repos/maninga/js-data/issues{/number}","pulls_url":"https://api.github.com/repos/maninga/js-data/pulls{/number}","milestones_url":"https://api.github.com/repos/maninga/js-data/milestones{/number}","notifications_url":"https://api.github.com/repos/maninga/js-data/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maninga/js-data/labels{/name}","releases_url":"https://api.github.com/repos/maninga/js-data/releases{/id}","created_at":"2015-04-03T16:35:32Z","updated_at":"2015-04-03T18:18:08Z","pushed_at":"2015-04-03T18:18:08Z","git_url":"git://github.com/maninga/js-data.git","ssh_url":"git@github.com:maninga/js-data.git","clone_url":"https://github.com/maninga/js-data.git","svn_url":"https://github.com/maninga/js-data","homepage":"http://www.js-data.io","size":3273,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"js-data:master","ref":"master","sha":"315492cbdc771065ea7c3a50d588ca5a32334151","user":{"login":"js-data","id":8730765,"avatar_url":"https://avatars.githubusercontent.com/u/8730765?v=3","gravatar_id":"","url":"https://api.github.com/users/js-data","html_url":"https://github.com/js-data","followers_url":"https://api.github.com/users/js-data/followers","following_url":"https://api.github.com/users/js-data/following{/other_user}","gists_url":"https://api.github.com/users/js-data/gists{/gist_id}","starred_url":"https://api.github.com/users/js-data/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/js-data/subscriptions","organizations_url":"https://api.github.com/users/js-data/orgs","repos_url":"https://api.github.com/users/js-data/repos","events_url":"https://api.github.com/users/js-data/events{/privacy}","received_events_url":"https://api.github.com/users/js-data/received_events","type":"Organization","site_admin":false},"repo":{"id":23899906,"name":"js-data","full_name":"js-data/js-data","owner":{"login":"js-data","id":8730765,"avatar_url":"https://avatars.githubusercontent.com/u/8730765?v=3","gravatar_id":"","url":"https://api.github.com/users/js-data","html_url":"https://github.com/js-data","followers_url":"https://api.github.com/users/js-data/followers","following_url":"https://api.github.com/users/js-data/following{/other_user}","gists_url":"https://api.github.com/users/js-data/gists{/gist_id}","starred_url":"https://api.github.com/users/js-data/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/js-data/subscriptions","organizations_url":"https://api.github.com/users/js-data/orgs","repos_url":"https://api.github.com/users/js-data/repos","events_url":"https://api.github.com/users/js-data/events{/privacy}","received_events_url":"https://api.github.com/users/js-data/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/js-data/js-data","description":"Robust framework-agnostic in-memory data store.","fork":false,"url":"https://api.github.com/repos/js-data/js-data","forks_url":"https://api.github.com/repos/js-data/js-data/forks","keys_url":"https://api.github.com/repos/js-data/js-data/keys{/key_id}","collaborators_url":"https://api.github.com/repos/js-data/js-data/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/js-data/js-data/teams","hooks_url":"https://api.github.com/repos/js-data/js-data/hooks","issue_events_url":"https://api.github.com/repos/js-data/js-data/issues/events{/number}","events_url":"https://api.github.com/repos/js-data/js-data/events","assignees_url":"https://api.github.com/repos/js-data/js-data/assignees{/user}","branches_url":"https://api.github.com/repos/js-data/js-data/branches{/branch}","tags_url":"https://api.github.com/repos/js-data/js-data/tags","blobs_url":"https://api.github.com/repos/js-data/js-data/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/js-data/js-data/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/js-data/js-data/git/refs{/sha}","trees_url":"https://api.github.com/repos/js-data/js-data/git/trees{/sha}","statuses_url":"https://api.github.com/repos/js-data/js-data/statuses/{sha}","languages_url":"https://api.github.com/repos/js-data/js-data/languages","stargazers_url":"https://api.github.com/repos/js-data/js-data/stargazers","contributors_url":"https://api.github.com/repos/js-data/js-data/contributors","subscribers_url":"https://api.github.com/repos/js-data/js-data/subscribers","subscription_url":"https://api.github.com/repos/js-data/js-data/subscription","commits_url":"https://api.github.com/repos/js-data/js-data/commits{/sha}","git_commits_url":"https://api.github.com/repos/js-data/js-data/git/commits{/sha}","comments_url":"https://api.github.com/repos/js-data/js-data/comments{/number}","issue_comment_url":"https://api.github.com/repos/js-data/js-data/issues/comments{/number}","contents_url":"https://api.github.com/repos/js-data/js-data/contents/{+path}","compare_url":"https://api.github.com/repos/js-data/js-data/compare/{base}...{head}","merges_url":"https://api.github.com/repos/js-data/js-data/merges","archive_url":"https://api.github.com/repos/js-data/js-data/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/js-data/js-data/downloads","issues_url":"https://api.github.com/repos/js-data/js-data/issues{/number}","pulls_url":"https://api.github.com/repos/js-data/js-data/pulls{/number}","milestones_url":"https://api.github.com/repos/js-data/js-data/milestones{/number}","notifications_url":"https://api.github.com/repos/js-data/js-data/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/js-data/js-data/labels{/name}","releases_url":"https://api.github.com/repos/js-data/js-data/releases{/id}","created_at":"2014-09-11T01:49:57Z","updated_at":"2015-04-03T00:59:26Z","pushed_at":"2015-04-03T18:32:53Z","git_url":"git://github.com/js-data/js-data.git","ssh_url":"git@github.com:js-data/js-data.git","clone_url":"https://github.com/js-data/js-data.git","svn_url":"https://github.com/js-data/js-data","homepage":"http://www.js-data.io","size":3273,"stargazers_count":386,"watchers_count":386,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":27,"mirror_url":null,"open_issues_count":17,"forks":27,"open_issues":17,"watchers":386,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/js-data/js-data/pulls/106"},"html":{"href":"https://github.com/js-data/js-data/pull/106"},"issue":{"href":"https://api.github.com/repos/js-data/js-data/issues/106"},"comments":{"href":"https://api.github.com/repos/js-data/js-data/issues/106/comments"},"review_comments":{"href":"https://api.github.com/repos/js-data/js-data/pulls/106/comments"},"review_comment":{"href":"https://api.github.com/repos/js-data/js-data/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/js-data/js-data/pulls/106/commits"},"statuses":{"href":"https://api.github.com/repos/js-data/js-data/statuses/27c5f4f5020739429bb4b3b2123b340f1a5cf92d"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":1,"review_comments":0,"commits":1,"additions":24,"deletions":5,"changed_files":2}}