{"action":"created","comment":{"url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/pulls/comments/177532422","pull_request_review_id":107416352,"id":177532422,"diff_hunk":"@@ -0,0 +1,41 @@\n+const Boom = require('boom');\n+const get = require('lodash.get');\n+const merge = require('lodash/merge');\n+const ValidationError = require('../ValidationError');\n+\n+module.exports = (Model, column, whereColumn, contextValuePath, message, constraintOptions) =>\n+  function(value, validatorOptions) {\n+    const options = merge(\n+      {\n+        convert: true,\n+        return404: true,\n+        fetchOptions: { eager: '', eagerOptions: {}, eagerAlgorithm: 'WhereInEagerAlgorithm' },","path":"src/objection/row-exists-where.js","position":12,"original_position":12,"commit_id":"d11bcafb3872443d80220afd210e7b854ebb5ac0","original_commit_id":"d11bcafb3872443d80220afd210e7b854ebb5ac0","user":{"login":"spruce-bruce","id":59978,"avatar_url":"https://avatars0.githubusercontent.com/u/59978?v=4","gravatar_id":"","url":"https://api.github.com/users/spruce-bruce","html_url":"https://github.com/spruce-bruce","followers_url":"https://api.github.com/users/spruce-bruce/followers","following_url":"https://api.github.com/users/spruce-bruce/following{/other_user}","gists_url":"https://api.github.com/users/spruce-bruce/gists{/gist_id}","starred_url":"https://api.github.com/users/spruce-bruce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spruce-bruce/subscriptions","organizations_url":"https://api.github.com/users/spruce-bruce/orgs","repos_url":"https://api.github.com/users/spruce-bruce/repos","events_url":"https://api.github.com/users/spruce-bruce/events{/privacy}","received_events_url":"https://api.github.com/users/spruce-bruce/received_events","type":"User","site_admin":false},"body":"I'm not the most familiar with objection's api - is this letting you do `where` calls on relationships somehow?","created_at":"2018-03-27T18:47:30Z","updated_at":"2018-03-27T18:53:16Z","html_url":"https://github.com/synapsestudios/hapi-async-validation/pull/10#discussion_r177532422","pull_request_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/pulls/10","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/synapsestudios/hapi-async-validation/pulls/comments/177532422"},"html":{"href":"https://github.com/synapsestudios/hapi-async-validation/pull/10#discussion_r177532422"},"pull_request":{"href":"https://api.github.com/repos/synapsestudios/hapi-async-validation/pulls/10"}},"in_reply_to_id":177531977},"pull_request":{"url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/pulls/10","id":177823116,"html_url":"https://github.com/synapsestudios/hapi-async-validation/pull/10","diff_url":"https://github.com/synapsestudios/hapi-async-validation/pull/10.diff","patch_url":"https://github.com/synapsestudios/hapi-async-validation/pull/10.patch","issue_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/issues/10","number":10,"state":"open","locked":false,"title":"9 objection based validators","user":{"login":"DemarcatedTitle","id":13124650,"avatar_url":"https://avatars1.githubusercontent.com/u/13124650?v=4","gravatar_id":"","url":"https://api.github.com/users/DemarcatedTitle","html_url":"https://github.com/DemarcatedTitle","followers_url":"https://api.github.com/users/DemarcatedTitle/followers","following_url":"https://api.github.com/users/DemarcatedTitle/following{/other_user}","gists_url":"https://api.github.com/users/DemarcatedTitle/gists{/gist_id}","starred_url":"https://api.github.com/users/DemarcatedTitle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DemarcatedTitle/subscriptions","organizations_url":"https://api.github.com/users/DemarcatedTitle/orgs","repos_url":"https://api.github.com/users/DemarcatedTitle/repos","events_url":"https://api.github.com/users/DemarcatedTitle/events{/privacy}","received_events_url":"https://api.github.com/users/DemarcatedTitle/received_events","type":"User","site_admin":false},"body":"Changes asyncValidation to correctly throw to Hapi 17\r\nAdds a JoiFactory function to create Joi errors because of Hapi 17 changes\r\nAdds objection based validators that pretty closely follow the function signature of the previous bookshelf validators, but with objections optional eager loading. \r\n\r\nRelated to: \r\nAdd objection-based validators #9 ","created_at":"2018-03-27T18:15:21Z","updated_at":"2018-03-27T18:53:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"001caf4e1204e564c790681d23c05a16f82333e7","assignee":null,"assignees":[],"requested_reviewers":[{"login":"areida","id":369030,"avatar_url":"https://avatars3.githubusercontent.com/u/369030?v=4","gravatar_id":"","url":"https://api.github.com/users/areida","html_url":"https://github.com/areida","followers_url":"https://api.github.com/users/areida/followers","following_url":"https://api.github.com/users/areida/following{/other_user}","gists_url":"https://api.github.com/users/areida/gists{/gist_id}","starred_url":"https://api.github.com/users/areida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/areida/subscriptions","organizations_url":"https://api.github.com/users/areida/orgs","repos_url":"https://api.github.com/users/areida/repos","events_url":"https://api.github.com/users/areida/events{/privacy}","received_events_url":"https://api.github.com/users/areida/received_events","type":"User","site_admin":false},{"login":"chrisshiplet","id":933501,"avatar_url":"https://avatars0.githubusercontent.com/u/933501?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisshiplet","html_url":"https://github.com/chrisshiplet","followers_url":"https://api.github.com/users/chrisshiplet/followers","following_url":"https://api.github.com/users/chrisshiplet/following{/other_user}","gists_url":"https://api.github.com/users/chrisshiplet/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisshiplet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisshiplet/subscriptions","organizations_url":"https://api.github.com/users/chrisshiplet/orgs","repos_url":"https://api.github.com/users/chrisshiplet/repos","events_url":"https://api.github.com/users/chrisshiplet/events{/privacy}","received_events_url":"https://api.github.com/users/chrisshiplet/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/pulls/10/commits","review_comments_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/pulls/10/comments","review_comment_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/issues/10/comments","statuses_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/statuses/d11bcafb3872443d80220afd210e7b854ebb5ac0","head":{"label":"synapsestudios:9-objection-based-validators","ref":"9-objection-based-validators","sha":"d11bcafb3872443d80220afd210e7b854ebb5ac0","user":{"login":"synapsestudios","id":197868,"avatar_url":"https://avatars0.githubusercontent.com/u/197868?v=4","gravatar_id":"","url":"https://api.github.com/users/synapsestudios","html_url":"https://github.com/synapsestudios","followers_url":"https://api.github.com/users/synapsestudios/followers","following_url":"https://api.github.com/users/synapsestudios/following{/other_user}","gists_url":"https://api.github.com/users/synapsestudios/gists{/gist_id}","starred_url":"https://api.github.com/users/synapsestudios/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/synapsestudios/subscriptions","organizations_url":"https://api.github.com/users/synapsestudios/orgs","repos_url":"https://api.github.com/users/synapsestudios/repos","events_url":"https://api.github.com/users/synapsestudios/events{/privacy}","received_events_url":"https://api.github.com/users/synapsestudios/received_events","type":"Organization","site_admin":false},"repo":{"id":98579512,"name":"hapi-async-validation","full_name":"synapsestudios/hapi-async-validation","owner":{"login":"synapsestudios","id":197868,"avatar_url":"https://avatars0.githubusercontent.com/u/197868?v=4","gravatar_id":"","url":"https://api.github.com/users/synapsestudios","html_url":"https://github.com/synapsestudios","followers_url":"https://api.github.com/users/synapsestudios/followers","following_url":"https://api.github.com/users/synapsestudios/following{/other_user}","gists_url":"https://api.github.com/users/synapsestudios/gists{/gist_id}","starred_url":"https://api.github.com/users/synapsestudios/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/synapsestudios/subscriptions","organizations_url":"https://api.github.com/users/synapsestudios/orgs","repos_url":"https://api.github.com/users/synapsestudios/repos","events_url":"https://api.github.com/users/synapsestudios/events{/privacy}","received_events_url":"https://api.github.com/users/synapsestudios/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/synapsestudios/hapi-async-validation","description":null,"fork":false,"url":"https://api.github.com/repos/synapsestudios/hapi-async-validation","forks_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/forks","keys_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/teams","hooks_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/hooks","issue_events_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/issues/events{/number}","events_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/events","assignees_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/assignees{/user}","branches_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/branches{/branch}","tags_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/tags","blobs_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/git/refs{/sha}","trees_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/statuses/{sha}","languages_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/languages","stargazers_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/stargazers","contributors_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/contributors","subscribers_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/subscribers","subscription_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/subscription","commits_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/commits{/sha}","git_commits_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/git/commits{/sha}","comments_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/comments{/number}","issue_comment_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/issues/comments{/number}","contents_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/contents/{+path}","compare_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/merges","archive_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/downloads","issues_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/issues{/number}","pulls_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/pulls{/number}","milestones_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/milestones{/number}","notifications_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/labels{/name}","releases_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/releases{/id}","deployments_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/deployments","created_at":"2017-07-27T21:01:59Z","updated_at":"2017-07-27T23:06:50Z","pushed_at":"2018-03-27T18:18:18Z","git_url":"git://github.com/synapsestudios/hapi-async-validation.git","ssh_url":"git@github.com:synapsestudios/hapi-async-validation.git","clone_url":"https://github.com/synapsestudios/hapi-async-validation.git","svn_url":"https://github.com/synapsestudios/hapi-async-validation","homepage":null,"size":95,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":8,"license":null,"forks":0,"open_issues":8,"watchers":0,"default_branch":"master"}},"base":{"label":"synapsestudios:release/v2.0.0","ref":"release/v2.0.0","sha":"6ba17da527a56232de366a7b2e8035f459667a61","user":{"login":"synapsestudios","id":197868,"avatar_url":"https://avatars0.githubusercontent.com/u/197868?v=4","gravatar_id":"","url":"https://api.github.com/users/synapsestudios","html_url":"https://github.com/synapsestudios","followers_url":"https://api.github.com/users/synapsestudios/followers","following_url":"https://api.github.com/users/synapsestudios/following{/other_user}","gists_url":"https://api.github.com/users/synapsestudios/gists{/gist_id}","starred_url":"https://api.github.com/users/synapsestudios/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/synapsestudios/subscriptions","organizations_url":"https://api.github.com/users/synapsestudios/orgs","repos_url":"https://api.github.com/users/synapsestudios/repos","events_url":"https://api.github.com/users/synapsestudios/events{/privacy}","received_events_url":"https://api.github.com/users/synapsestudios/received_events","type":"Organization","site_admin":false},"repo":{"id":98579512,"name":"hapi-async-validation","full_name":"synapsestudios/hapi-async-validation","owner":{"login":"synapsestudios","id":197868,"avatar_url":"https://avatars0.githubusercontent.com/u/197868?v=4","gravatar_id":"","url":"https://api.github.com/users/synapsestudios","html_url":"https://github.com/synapsestudios","followers_url":"https://api.github.com/users/synapsestudios/followers","following_url":"https://api.github.com/users/synapsestudios/following{/other_user}","gists_url":"https://api.github.com/users/synapsestudios/gists{/gist_id}","starred_url":"https://api.github.com/users/synapsestudios/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/synapsestudios/subscriptions","organizations_url":"https://api.github.com/users/synapsestudios/orgs","repos_url":"https://api.github.com/users/synapsestudios/repos","events_url":"https://api.github.com/users/synapsestudios/events{/privacy}","received_events_url":"https://api.github.com/users/synapsestudios/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/synapsestudios/hapi-async-validation","description":null,"fork":false,"url":"https://api.github.com/repos/synapsestudios/hapi-async-validation","forks_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/forks","keys_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/teams","hooks_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/hooks","issue_events_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/issues/events{/number}","events_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/events","assignees_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/assignees{/user}","branches_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/branches{/branch}","tags_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/tags","blobs_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/git/refs{/sha}","trees_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/statuses/{sha}","languages_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/languages","stargazers_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/stargazers","contributors_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/contributors","subscribers_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/subscribers","subscription_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/subscription","commits_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/commits{/sha}","git_commits_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/git/commits{/sha}","comments_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/comments{/number}","issue_comment_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/issues/comments{/number}","contents_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/contents/{+path}","compare_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/merges","archive_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/downloads","issues_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/issues{/number}","pulls_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/pulls{/number}","milestones_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/milestones{/number}","notifications_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/labels{/name}","releases_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/releases{/id}","deployments_url":"https://api.github.com/repos/synapsestudios/hapi-async-validation/deployments","created_at":"2017-07-27T21:01:59Z","updated_at":"2017-07-27T23:06:50Z","pushed_at":"2018-03-27T18:18:18Z","git_url":"git://github.com/synapsestudios/hapi-async-validation.git","ssh_url":"git@github.com:synapsestudios/hapi-async-validation.git","clone_url":"https://github.com/synapsestudios/hapi-async-validation.git","svn_url":"https://github.com/synapsestudios/hapi-async-validation","homepage":null,"size":95,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":8,"license":null,"forks":0,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/synapsestudios/hapi-async-validation/pulls/10"},"html":{"href":"https://github.com/synapsestudios/hapi-async-validation/pull/10"},"issue":{"href":"https://api.github.com/repos/synapsestudios/hapi-async-validation/issues/10"},"comments":{"href":"https://api.github.com/repos/synapsestudios/hapi-async-validation/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/synapsestudios/hapi-async-validation/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/synapsestudios/hapi-async-validation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/synapsestudios/hapi-async-validation/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/synapsestudios/hapi-async-validation/statuses/d11bcafb3872443d80220afd210e7b854ebb5ac0"}},"author_association":"NONE"}}
{"actor":{"display_login":"spruce-bruce"}}