{"action":"created","comment":{"url":"https://api.github.com/repos/realm/realm-java/pulls/comments/119180710","pull_request_review_id":41037231,"id":119180710,"diff_hunk":"@@ -84,12 +84,17 @@ static TableRef getTableForLinkQuery(jlong nativeQueryPtr, JniLongArray& tablesA\n }\n \n // Return TableRef point to original table or the link table\n-static TableRef getTableByArray(jlong nativeQueryPtr, JniLongArray& indicesArray)\n+static TableRef getTableByArray(jlong nativeQueryPtr, JniLongArray& tablesArray, JniLongArray& indicesArray)\n {\n     TableRef table_ref = Q(nativeQueryPtr)->get_table();\n     jsize link_element_count = indicesArray.len() - 1;\n     for (int i = 0; i < link_element_count; i++) {\n-        table_ref = table_ref->get_link_target(size_t(indicesArray[i]));\n+        if (TBL(tablesArray[i]) == nullptr) {","path":"realm/realm-library/src/main/cpp/io_realm_internal_TableQuery.cpp","position":27,"original_position":27,"commit_id":"25a2f3fd83672e225d058eb6273419416bcbac44","original_commit_id":"25a2f3fd83672e225d058eb6273419416bcbac44","user":{"login":"bmeike","id":277848,"avatar_url":"https://avatars1.githubusercontent.com/u/277848?v=3","gravatar_id":"","url":"https://api.github.com/users/bmeike","html_url":"https://github.com/bmeike","followers_url":"https://api.github.com/users/bmeike/followers","following_url":"https://api.github.com/users/bmeike/following{/other_user}","gists_url":"https://api.github.com/users/bmeike/gists{/gist_id}","starred_url":"https://api.github.com/users/bmeike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmeike/subscriptions","organizations_url":"https://api.github.com/users/bmeike/orgs","repos_url":"https://api.github.com/users/bmeike/repos","events_url":"https://api.github.com/users/bmeike/events{/privacy}","received_events_url":"https://api.github.com/users/bmeike/received_events","type":"User","site_admin":false},"body":"So, I can say with absolute certainty, that there is still a boatload of use of those macros.  It is doubly confusing to have both techniques just a couple lines apart (... and I don't recall if that is the case, here).  If we are going to \"move\", this is one of the few cases that I would suggest we not do it piecemeal.  We should change the style, at the very least, for an entire file.","created_at":"2017-05-30T18:36:59Z","updated_at":"2017-05-30T18:36:59Z","html_url":"https://github.com/realm/realm-java/pull/4704#discussion_r119180710","pull_request_url":"https://api.github.com/repos/realm/realm-java/pulls/4704","_links":{"self":{"href":"https://api.github.com/repos/realm/realm-java/pulls/comments/119180710"},"html":{"href":"https://github.com/realm/realm-java/pull/4704#discussion_r119180710"},"pull_request":{"href":"https://api.github.com/repos/realm/realm-java/pulls/4704"}}},"pull_request":{"url":"https://api.github.com/repos/realm/realm-java/pulls/4704","id":122513902,"html_url":"https://github.com/realm/realm-java/pull/4704","diff_url":"https://github.com/realm/realm-java/pull/4704.diff","patch_url":"https://github.com/realm/realm-java/pull/4704.patch","issue_url":"https://api.github.com/repos/realm/realm-java/issues/4704","number":4704,"state":"open","locked":false,"title":"Backlink queries","user":{"login":"kneth","id":1225363,"avatar_url":"https://avatars3.githubusercontent.com/u/1225363?v=3","gravatar_id":"","url":"https://api.github.com/users/kneth","html_url":"https://github.com/kneth","followers_url":"https://api.github.com/users/kneth/followers","following_url":"https://api.github.com/users/kneth/following{/other_user}","gists_url":"https://api.github.com/users/kneth/gists{/gist_id}","starred_url":"https://api.github.com/users/kneth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kneth/subscriptions","organizations_url":"https://api.github.com/users/kneth/orgs","repos_url":"https://api.github.com/users/kneth/repos","events_url":"https://api.github.com/users/kneth/events{/privacy}","received_events_url":"https://api.github.com/users/kneth/received_events","type":"User","site_admin":false},"body":"@bmeike did all the hard work. I am merely wrapping up. This PR is still WIP!\r\n\r\n* [x] Fix unit tests for backlink queries.\r\n* [x] Explain what unit tests are testing.\r\n* [x] Introduce a native implementation of isNotEmpty() - see also #2025.\r\n* [x] ~Remove~ rewrite`getTableByArray()`.\r\n* [x] Add support for queries when last element is a backlink.\r\n* [x] Update documentation about link (add backlink) at web site - #4320. See also https://github.com/realm/realm.io/pull/3294\r\n\r\nSee also #4620.","created_at":"2017-05-25T20:01:16Z","updated_at":"2017-05-30T18:36:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7316e17808caabde2f7456d3a125daa00887bb97","assignee":{"login":"kneth","id":1225363,"avatar_url":"https://avatars3.githubusercontent.com/u/1225363?v=3","gravatar_id":"","url":"https://api.github.com/users/kneth","html_url":"https://github.com/kneth","followers_url":"https://api.github.com/users/kneth/followers","following_url":"https://api.github.com/users/kneth/following{/other_user}","gists_url":"https://api.github.com/users/kneth/gists{/gist_id}","starred_url":"https://api.github.com/users/kneth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kneth/subscriptions","organizations_url":"https://api.github.com/users/kneth/orgs","repos_url":"https://api.github.com/users/kneth/repos","events_url":"https://api.github.com/users/kneth/events{/privacy}","received_events_url":"https://api.github.com/users/kneth/received_events","type":"User","site_admin":false},"assignees":[{"login":"kneth","id":1225363,"avatar_url":"https://avatars3.githubusercontent.com/u/1225363?v=3","gravatar_id":"","url":"https://api.github.com/users/kneth","html_url":"https://github.com/kneth","followers_url":"https://api.github.com/users/kneth/followers","following_url":"https://api.github.com/users/kneth/following{/other_user}","gists_url":"https://api.github.com/users/kneth/gists{/gist_id}","starred_url":"https://api.github.com/users/kneth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kneth/subscriptions","organizations_url":"https://api.github.com/users/kneth/orgs","repos_url":"https://api.github.com/users/kneth/repos","events_url":"https://api.github.com/users/kneth/events{/privacy}","received_events_url":"https://api.github.com/users/kneth/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/realm/realm-java/pulls/4704/commits","review_comments_url":"https://api.github.com/repos/realm/realm-java/pulls/4704/comments","review_comment_url":"https://api.github.com/repos/realm/realm-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/realm/realm-java/issues/4704/comments","statuses_url":"https://api.github.com/repos/realm/realm-java/statuses/25a2f3fd83672e225d058eb6273419416bcbac44","head":{"label":"realm:kneth/query-backlink","ref":"kneth/query-backlink","sha":"25a2f3fd83672e225d058eb6273419416bcbac44","user":{"login":"realm","id":7575099,"avatar_url":"https://avatars3.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"repo":{"id":4084908,"name":"realm-java","full_name":"realm/realm-java","owner":{"login":"realm","id":7575099,"avatar_url":"https://avatars3.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/realm/realm-java","description":"Realm is a mobile database: a replacement for SQLite & ORMs","fork":false,"url":"https://api.github.com/repos/realm/realm-java","forks_url":"https://api.github.com/repos/realm/realm-java/forks","keys_url":"https://api.github.com/repos/realm/realm-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/realm/realm-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/realm/realm-java/teams","hooks_url":"https://api.github.com/repos/realm/realm-java/hooks","issue_events_url":"https://api.github.com/repos/realm/realm-java/issues/events{/number}","events_url":"https://api.github.com/repos/realm/realm-java/events","assignees_url":"https://api.github.com/repos/realm/realm-java/assignees{/user}","branches_url":"https://api.github.com/repos/realm/realm-java/branches{/branch}","tags_url":"https://api.github.com/repos/realm/realm-java/tags","blobs_url":"https://api.github.com/repos/realm/realm-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/realm/realm-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/realm/realm-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/realm/realm-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/realm/realm-java/statuses/{sha}","languages_url":"https://api.github.com/repos/realm/realm-java/languages","stargazers_url":"https://api.github.com/repos/realm/realm-java/stargazers","contributors_url":"https://api.github.com/repos/realm/realm-java/contributors","subscribers_url":"https://api.github.com/repos/realm/realm-java/subscribers","subscription_url":"https://api.github.com/repos/realm/realm-java/subscription","commits_url":"https://api.github.com/repos/realm/realm-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/realm/realm-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/realm/realm-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/realm/realm-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/realm/realm-java/contents/{+path}","compare_url":"https://api.github.com/repos/realm/realm-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/realm/realm-java/merges","archive_url":"https://api.github.com/repos/realm/realm-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/realm/realm-java/downloads","issues_url":"https://api.github.com/repos/realm/realm-java/issues{/number}","pulls_url":"https://api.github.com/repos/realm/realm-java/pulls{/number}","milestones_url":"https://api.github.com/repos/realm/realm-java/milestones{/number}","notifications_url":"https://api.github.com/repos/realm/realm-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/realm/realm-java/labels{/name}","releases_url":"https://api.github.com/repos/realm/realm-java/releases{/id}","deployments_url":"https://api.github.com/repos/realm/realm-java/deployments","created_at":"2012-04-20T09:18:42Z","updated_at":"2017-05-30T16:37:12Z","pushed_at":"2017-05-30T13:40:34Z","git_url":"git://github.com/realm/realm-java.git","ssh_url":"git@github.com:realm/realm-java.git","clone_url":"https://github.com/realm/realm-java.git","svn_url":"https://github.com/realm/realm-java","homepage":"http://realm.io","size":52605,"stargazers_count":7792,"watchers_count":7792,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1213,"mirror_url":null,"open_issues_count":344,"forks":1213,"open_issues":344,"watchers":7792,"default_branch":"master"}},"base":{"label":"realm:master","ref":"master","sha":"50e927cce5df8e6693d56764a51650a71e118dd7","user":{"login":"realm","id":7575099,"avatar_url":"https://avatars3.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"repo":{"id":4084908,"name":"realm-java","full_name":"realm/realm-java","owner":{"login":"realm","id":7575099,"avatar_url":"https://avatars3.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/realm/realm-java","description":"Realm is a mobile database: a replacement for SQLite & ORMs","fork":false,"url":"https://api.github.com/repos/realm/realm-java","forks_url":"https://api.github.com/repos/realm/realm-java/forks","keys_url":"https://api.github.com/repos/realm/realm-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/realm/realm-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/realm/realm-java/teams","hooks_url":"https://api.github.com/repos/realm/realm-java/hooks","issue_events_url":"https://api.github.com/repos/realm/realm-java/issues/events{/number}","events_url":"https://api.github.com/repos/realm/realm-java/events","assignees_url":"https://api.github.com/repos/realm/realm-java/assignees{/user}","branches_url":"https://api.github.com/repos/realm/realm-java/branches{/branch}","tags_url":"https://api.github.com/repos/realm/realm-java/tags","blobs_url":"https://api.github.com/repos/realm/realm-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/realm/realm-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/realm/realm-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/realm/realm-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/realm/realm-java/statuses/{sha}","languages_url":"https://api.github.com/repos/realm/realm-java/languages","stargazers_url":"https://api.github.com/repos/realm/realm-java/stargazers","contributors_url":"https://api.github.com/repos/realm/realm-java/contributors","subscribers_url":"https://api.github.com/repos/realm/realm-java/subscribers","subscription_url":"https://api.github.com/repos/realm/realm-java/subscription","commits_url":"https://api.github.com/repos/realm/realm-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/realm/realm-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/realm/realm-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/realm/realm-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/realm/realm-java/contents/{+path}","compare_url":"https://api.github.com/repos/realm/realm-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/realm/realm-java/merges","archive_url":"https://api.github.com/repos/realm/realm-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/realm/realm-java/downloads","issues_url":"https://api.github.com/repos/realm/realm-java/issues{/number}","pulls_url":"https://api.github.com/repos/realm/realm-java/pulls{/number}","milestones_url":"https://api.github.com/repos/realm/realm-java/milestones{/number}","notifications_url":"https://api.github.com/repos/realm/realm-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/realm/realm-java/labels{/name}","releases_url":"https://api.github.com/repos/realm/realm-java/releases{/id}","deployments_url":"https://api.github.com/repos/realm/realm-java/deployments","created_at":"2012-04-20T09:18:42Z","updated_at":"2017-05-30T16:37:12Z","pushed_at":"2017-05-30T13:40:34Z","git_url":"git://github.com/realm/realm-java.git","ssh_url":"git@github.com:realm/realm-java.git","clone_url":"https://github.com/realm/realm-java.git","svn_url":"https://github.com/realm/realm-java","homepage":"http://realm.io","size":52605,"stargazers_count":7792,"watchers_count":7792,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1213,"mirror_url":null,"open_issues_count":344,"forks":1213,"open_issues":344,"watchers":7792,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/realm/realm-java/pulls/4704"},"html":{"href":"https://github.com/realm/realm-java/pull/4704"},"issue":{"href":"https://api.github.com/repos/realm/realm-java/issues/4704"},"comments":{"href":"https://api.github.com/repos/realm/realm-java/issues/4704/comments"},"review_comments":{"href":"https://api.github.com/repos/realm/realm-java/pulls/4704/comments"},"review_comment":{"href":"https://api.github.com/repos/realm/realm-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/realm/realm-java/pulls/4704/commits"},"statuses":{"href":"https://api.github.com/repos/realm/realm-java/statuses/25a2f3fd83672e225d058eb6273419416bcbac44"}}}}
{"actor":{"display_login":"bmeike"}}