{"action":"created","comment":{"url":"https://api.github.com/repos/yahoo/elide/pulls/comments/54336442","id":54336442,"diff_hunk":"@@ -702,11 +704,18 @@ public PersistentResource getRelation(String relation, String id) {\n      * @return collection relation\n      */\n     public Set<PersistentResource> getRelation(String relationName) {\n-        if (requestScope.getTransaction() != null && !requestScope.getPredicates().isEmpty()) {\n-            final Class<?> entityClass = dictionary.getParameterizedType(obj, relationName);\n-            final String valType = dictionary.getBinding(entityClass);\n-            final Set<Predicate> filters = new HashSet<>(requestScope.getPredicatesOfType(valType));\n-            return getRelation(relationName, filters);\n+        // if pagination, then sorting with filters...\n+        boolean hasFilters = !requestScope.getPredicates().isEmpty();\n+        Set<Predicate> filters = null;\n+        if (requestScope.getTransaction() != null && requestScope.getQueryParams().isPresent()) {","path":"elide-core/src/main/java/com/yahoo/elide/core/PersistentResource.java","position":21,"original_position":21,"commit_id":"478b190844eae422f0ef91227c30752275dcb031","original_commit_id":"1a5ba9a9bd72e7376958b3085a7658cd69cb9f50","user":{"login":"aklish","id":6979393,"avatar_url":"https://avatars.githubusercontent.com/u/6979393?v=3","gravatar_id":"","url":"https://api.github.com/users/aklish","html_url":"https://github.com/aklish","followers_url":"https://api.github.com/users/aklish/followers","following_url":"https://api.github.com/users/aklish/following{/other_user}","gists_url":"https://api.github.com/users/aklish/gists{/gist_id}","starred_url":"https://api.github.com/users/aklish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aklish/subscriptions","organizations_url":"https://api.github.com/users/aklish/orgs","repos_url":"https://api.github.com/users/aklish/repos","events_url":"https://api.github.com/users/aklish/events{/privacy}","received_events_url":"https://api.github.com/users/aklish/received_events","type":"User","site_admin":false},"body":"I wouldn't worry about checking for GET.  It is something that should be fixed, but I think it is outside the scope of pagination.","created_at":"2016-02-27T17:47:20Z","updated_at":"2016-02-27T17:47:20Z","html_url":"https://github.com/yahoo/elide/pull/149#discussion_r54336442","pull_request_url":"https://api.github.com/repos/yahoo/elide/pulls/149","_links":{"self":{"href":"https://api.github.com/repos/yahoo/elide/pulls/comments/54336442"},"html":{"href":"https://github.com/yahoo/elide/pull/149#discussion_r54336442"},"pull_request":{"href":"https://api.github.com/repos/yahoo/elide/pulls/149"}}},"pull_request":{"url":"https://api.github.com/repos/yahoo/elide/pulls/149","id":60435663,"html_url":"https://github.com/yahoo/elide/pull/149","diff_url":"https://github.com/yahoo/elide/pull/149.diff","patch_url":"https://github.com/yahoo/elide/pull/149.patch","issue_url":"https://api.github.com/repos/yahoo/elide/issues/149","number":149,"state":"open","locked":false,"title":"first pass for pagination","user":{"login":"newfront","id":460318,"avatar_url":"https://avatars.githubusercontent.com/u/460318?v=3","gravatar_id":"","url":"https://api.github.com/users/newfront","html_url":"https://github.com/newfront","followers_url":"https://api.github.com/users/newfront/followers","following_url":"https://api.github.com/users/newfront/following{/other_user}","gists_url":"https://api.github.com/users/newfront/gists{/gist_id}","starred_url":"https://api.github.com/users/newfront/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newfront/subscriptions","organizations_url":"https://api.github.com/users/newfront/orgs","repos_url":"https://api.github.com/users/newfront/repos","events_url":"https://api.github.com/users/newfront/events{/privacy}","received_events_url":"https://api.github.com/users/newfront/received_events","type":"User","site_admin":false},"body":"@DeathByTape @aklish Here is the first pass for pagination. --DO NOT MERGE--\r\n\r\nAssumptions\r\n1. Pagination is currently for SQL style data stores.\r\n\r\n2. Pagination is for top level collections [otherwise what would the suggestion be for doing sub-entity pagination, while maintaining sort order of child entities?]\r\n\r\n3. Pagination should work on its own, or as the last operation on a query [unless we honor sub-ordering and limitations which MySQL doesn't honor in all cases [https://dev.mysql.com/doc/refman/5.7/en/subquery-restrictions.html]\r\n\r\n4. Pagination should honor sorting, and take the sort params / parse them and add into the Order items on the Session object. [ TO DO]","created_at":"2016-02-24T00:25:45Z","updated_at":"2016-02-27T17:47:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1fd3c7782b0c46bfdb823e24dcbedc87a6ad4951","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yahoo/elide/pulls/149/commits","review_comments_url":"https://api.github.com/repos/yahoo/elide/pulls/149/comments","review_comment_url":"https://api.github.com/repos/yahoo/elide/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yahoo/elide/issues/149/comments","statuses_url":"https://api.github.com/repos/yahoo/elide/statuses/478b190844eae422f0ef91227c30752275dcb031","head":{"label":"yahoo:FLAPP-add_pagination","ref":"FLAPP-add_pagination","sha":"478b190844eae422f0ef91227c30752275dcb031","user":{"login":"yahoo","id":16574,"avatar_url":"https://avatars.githubusercontent.com/u/16574?v=3","gravatar_id":"","url":"https://api.github.com/users/yahoo","html_url":"https://github.com/yahoo","followers_url":"https://api.github.com/users/yahoo/followers","following_url":"https://api.github.com/users/yahoo/following{/other_user}","gists_url":"https://api.github.com/users/yahoo/gists{/gist_id}","starred_url":"https://api.github.com/users/yahoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahoo/subscriptions","organizations_url":"https://api.github.com/users/yahoo/orgs","repos_url":"https://api.github.com/users/yahoo/repos","events_url":"https://api.github.com/users/yahoo/events{/privacy}","received_events_url":"https://api.github.com/users/yahoo/received_events","type":"Organization","site_admin":false},"repo":{"id":44124366,"name":"elide","full_name":"yahoo/elide","owner":{"login":"yahoo","id":16574,"avatar_url":"https://avatars.githubusercontent.com/u/16574?v=3","gravatar_id":"","url":"https://api.github.com/users/yahoo","html_url":"https://github.com/yahoo","followers_url":"https://api.github.com/users/yahoo/followers","following_url":"https://api.github.com/users/yahoo/following{/other_user}","gists_url":"https://api.github.com/users/yahoo/gists{/gist_id}","starred_url":"https://api.github.com/users/yahoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahoo/subscriptions","organizations_url":"https://api.github.com/users/yahoo/orgs","repos_url":"https://api.github.com/users/yahoo/repos","events_url":"https://api.github.com/users/yahoo/events{/privacy}","received_events_url":"https://api.github.com/users/yahoo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yahoo/elide","description":"Elide is a Java library that lets you stand up a JSON API web service with minimal effort","fork":false,"url":"https://api.github.com/repos/yahoo/elide","forks_url":"https://api.github.com/repos/yahoo/elide/forks","keys_url":"https://api.github.com/repos/yahoo/elide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yahoo/elide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yahoo/elide/teams","hooks_url":"https://api.github.com/repos/yahoo/elide/hooks","issue_events_url":"https://api.github.com/repos/yahoo/elide/issues/events{/number}","events_url":"https://api.github.com/repos/yahoo/elide/events","assignees_url":"https://api.github.com/repos/yahoo/elide/assignees{/user}","branches_url":"https://api.github.com/repos/yahoo/elide/branches{/branch}","tags_url":"https://api.github.com/repos/yahoo/elide/tags","blobs_url":"https://api.github.com/repos/yahoo/elide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yahoo/elide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yahoo/elide/git/refs{/sha}","trees_url":"https://api.github.com/repos/yahoo/elide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yahoo/elide/statuses/{sha}","languages_url":"https://api.github.com/repos/yahoo/elide/languages","stargazers_url":"https://api.github.com/repos/yahoo/elide/stargazers","contributors_url":"https://api.github.com/repos/yahoo/elide/contributors","subscribers_url":"https://api.github.com/repos/yahoo/elide/subscribers","subscription_url":"https://api.github.com/repos/yahoo/elide/subscription","commits_url":"https://api.github.com/repos/yahoo/elide/commits{/sha}","git_commits_url":"https://api.github.com/repos/yahoo/elide/git/commits{/sha}","comments_url":"https://api.github.com/repos/yahoo/elide/comments{/number}","issue_comment_url":"https://api.github.com/repos/yahoo/elide/issues/comments{/number}","contents_url":"https://api.github.com/repos/yahoo/elide/contents/{+path}","compare_url":"https://api.github.com/repos/yahoo/elide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yahoo/elide/merges","archive_url":"https://api.github.com/repos/yahoo/elide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yahoo/elide/downloads","issues_url":"https://api.github.com/repos/yahoo/elide/issues{/number}","pulls_url":"https://api.github.com/repos/yahoo/elide/pulls{/number}","milestones_url":"https://api.github.com/repos/yahoo/elide/milestones{/number}","notifications_url":"https://api.github.com/repos/yahoo/elide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yahoo/elide/labels{/name}","releases_url":"https://api.github.com/repos/yahoo/elide/releases{/id}","deployments_url":"https://api.github.com/repos/yahoo/elide/deployments","created_at":"2015-10-12T17:55:01Z","updated_at":"2016-02-27T04:32:00Z","pushed_at":"2016-02-27T02:01:32Z","git_url":"git://github.com/yahoo/elide.git","ssh_url":"git@github.com:yahoo/elide.git","clone_url":"https://github.com/yahoo/elide.git","svn_url":"https://github.com/yahoo/elide","homepage":"http://elide.io/","size":1405,"stargazers_count":78,"watchers_count":78,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":25,"forks":16,"open_issues":25,"watchers":78,"default_branch":"master"}},"base":{"label":"yahoo:master","ref":"master","sha":"2cf6f83b2b71409c1e6d82c11d81a538ab2c140c","user":{"login":"yahoo","id":16574,"avatar_url":"https://avatars.githubusercontent.com/u/16574?v=3","gravatar_id":"","url":"https://api.github.com/users/yahoo","html_url":"https://github.com/yahoo","followers_url":"https://api.github.com/users/yahoo/followers","following_url":"https://api.github.com/users/yahoo/following{/other_user}","gists_url":"https://api.github.com/users/yahoo/gists{/gist_id}","starred_url":"https://api.github.com/users/yahoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahoo/subscriptions","organizations_url":"https://api.github.com/users/yahoo/orgs","repos_url":"https://api.github.com/users/yahoo/repos","events_url":"https://api.github.com/users/yahoo/events{/privacy}","received_events_url":"https://api.github.com/users/yahoo/received_events","type":"Organization","site_admin":false},"repo":{"id":44124366,"name":"elide","full_name":"yahoo/elide","owner":{"login":"yahoo","id":16574,"avatar_url":"https://avatars.githubusercontent.com/u/16574?v=3","gravatar_id":"","url":"https://api.github.com/users/yahoo","html_url":"https://github.com/yahoo","followers_url":"https://api.github.com/users/yahoo/followers","following_url":"https://api.github.com/users/yahoo/following{/other_user}","gists_url":"https://api.github.com/users/yahoo/gists{/gist_id}","starred_url":"https://api.github.com/users/yahoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahoo/subscriptions","organizations_url":"https://api.github.com/users/yahoo/orgs","repos_url":"https://api.github.com/users/yahoo/repos","events_url":"https://api.github.com/users/yahoo/events{/privacy}","received_events_url":"https://api.github.com/users/yahoo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yahoo/elide","description":"Elide is a Java library that lets you stand up a JSON API web service with minimal effort","fork":false,"url":"https://api.github.com/repos/yahoo/elide","forks_url":"https://api.github.com/repos/yahoo/elide/forks","keys_url":"https://api.github.com/repos/yahoo/elide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yahoo/elide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yahoo/elide/teams","hooks_url":"https://api.github.com/repos/yahoo/elide/hooks","issue_events_url":"https://api.github.com/repos/yahoo/elide/issues/events{/number}","events_url":"https://api.github.com/repos/yahoo/elide/events","assignees_url":"https://api.github.com/repos/yahoo/elide/assignees{/user}","branches_url":"https://api.github.com/repos/yahoo/elide/branches{/branch}","tags_url":"https://api.github.com/repos/yahoo/elide/tags","blobs_url":"https://api.github.com/repos/yahoo/elide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yahoo/elide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yahoo/elide/git/refs{/sha}","trees_url":"https://api.github.com/repos/yahoo/elide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yahoo/elide/statuses/{sha}","languages_url":"https://api.github.com/repos/yahoo/elide/languages","stargazers_url":"https://api.github.com/repos/yahoo/elide/stargazers","contributors_url":"https://api.github.com/repos/yahoo/elide/contributors","subscribers_url":"https://api.github.com/repos/yahoo/elide/subscribers","subscription_url":"https://api.github.com/repos/yahoo/elide/subscription","commits_url":"https://api.github.com/repos/yahoo/elide/commits{/sha}","git_commits_url":"https://api.github.com/repos/yahoo/elide/git/commits{/sha}","comments_url":"https://api.github.com/repos/yahoo/elide/comments{/number}","issue_comment_url":"https://api.github.com/repos/yahoo/elide/issues/comments{/number}","contents_url":"https://api.github.com/repos/yahoo/elide/contents/{+path}","compare_url":"https://api.github.com/repos/yahoo/elide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yahoo/elide/merges","archive_url":"https://api.github.com/repos/yahoo/elide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yahoo/elide/downloads","issues_url":"https://api.github.com/repos/yahoo/elide/issues{/number}","pulls_url":"https://api.github.com/repos/yahoo/elide/pulls{/number}","milestones_url":"https://api.github.com/repos/yahoo/elide/milestones{/number}","notifications_url":"https://api.github.com/repos/yahoo/elide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yahoo/elide/labels{/name}","releases_url":"https://api.github.com/repos/yahoo/elide/releases{/id}","deployments_url":"https://api.github.com/repos/yahoo/elide/deployments","created_at":"2015-10-12T17:55:01Z","updated_at":"2016-02-27T04:32:00Z","pushed_at":"2016-02-27T02:01:32Z","git_url":"git://github.com/yahoo/elide.git","ssh_url":"git@github.com:yahoo/elide.git","clone_url":"https://github.com/yahoo/elide.git","svn_url":"https://github.com/yahoo/elide","homepage":"http://elide.io/","size":1405,"stargazers_count":78,"watchers_count":78,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":25,"forks":16,"open_issues":25,"watchers":78,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yahoo/elide/pulls/149"},"html":{"href":"https://github.com/yahoo/elide/pull/149"},"issue":{"href":"https://api.github.com/repos/yahoo/elide/issues/149"},"comments":{"href":"https://api.github.com/repos/yahoo/elide/issues/149/comments"},"review_comments":{"href":"https://api.github.com/repos/yahoo/elide/pulls/149/comments"},"review_comment":{"href":"https://api.github.com/repos/yahoo/elide/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yahoo/elide/pulls/149/commits"},"statuses":{"href":"https://api.github.com/repos/yahoo/elide/statuses/478b190844eae422f0ef91227c30752275dcb031"}}}}