GitHub PullRequestReviewCommentEvent at 2014-06-10 20:03:10
Repository: playframework
Actor: cchantep
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/playframework/playframework/pulls/comments/13615689","id":13615689,"diff_hunk":"@@ -196,20 +208,9 @@ object BatchSqlSpec extends org.specs2.mutable.Specification {\n   }\n \n   \"Appending list of parameter values\" should {\n-    \"fail with missing names\" in {","path":"framework/src/anorm/src/test/scala/anorm/BatchSqlSpec.scala","position":163,"original_position":163,"commit_id":"ab19e23e1db099c308fad01348dc2b045ce1fa71","original_commit_id":"ab19e23e1db099c308fad01348dc2b045ce1fa71","user":{"login":"cchantep","id":166062,"avatar_url":"https://avatars.githubusercontent.com/u/166062?","gravatar_id":"12e92f7dd3e8c432ca551cf263c89177","url":"https://api.github.com/users/cchantep","html_url":"https://github.com/cchantep","followers_url":"https://api.github.com/users/cchantep/followers","following_url":"https://api.github.com/users/cchantep/following{/other_user}","gists_url":"https://api.github.com/users/cchantep/gists{/gist_id}","starred_url":"https://api.github.com/users/cchantep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cchantep/subscriptions","organizations_url":"https://api.github.com/users/cchantep/orgs","repos_url":"https://api.github.com/users/cchantep/repos","events_url":"https://api.github.com/users/cchantep/events{/privacy}","received_events_url":"https://api.github.com/users/cchantep/received_events","type":"User","site_admin":false},"body":"Meaningless as soon as `SqlQuery` is parsed at batch creation.","created_at":"2014-06-10T20:03:10Z","updated_at":"2014-06-10T20:03:10Z","html_url":"https://github.com/playframework/playframework/pull/3016#discussion_r13615689","pull_request_url":"https://api.github.com/repos/playframework/playframework/pulls/3016","_links":{"self":{"href":"https://api.github.com/repos/playframework/playframework/pulls/comments/13615689"},"html":{"href":"https://github.com/playframework/playframework/pull/3016#discussion_r13615689"},"pull_request":{"href":"https://api.github.com/repos/playframework/playframework/pulls/3016"}}},"pull_request":{"url":"https://api.github.com/repos/playframework/playframework/pulls/3016","id":16961788,"html_url":"https://github.com/playframework/playframework/pull/3016","diff_url":"https://github.com/playframework/playframework/pull/3016.diff","patch_url":"https://github.com/playframework/playframework/pull/3016.patch","issue_url":"https://api.github.com/repos/playframework/playframework/issues/3016","number":3016,"state":"open","title":"Anorm BatchSql throws an error when executed since Play 2.3","user":{"login":"cchantep","id":166062,"avatar_url":"https://avatars.githubusercontent.com/u/166062?","gravatar_id":"12e92f7dd3e8c432ca551cf263c89177","url":"https://api.github.com/users/cchantep","html_url":"https://github.com/cchantep","followers_url":"https://api.github.com/users/cchantep/followers","following_url":"https://api.github.com/users/cchantep/following{/other_user}","gists_url":"https://api.github.com/users/cchantep/gists{/gist_id}","starred_url":"https://api.github.com/users/cchantep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cchantep/subscriptions","organizations_url":"https://api.github.com/users/cchantep/orgs","repos_url":"https://api.github.com/users/cchantep/repos","events_url":"https://api.github.com/users/cchantep/events{/privacy}","received_events_url":"https://api.github.com/users/cchantep/received_events","type":"User","site_admin":false},"body":"After I updated to Play 2.3 my batch queries fail to execute with the following exception:\r\n\r\n```\r\nPSQLException: The column index is out of range: 1, number of columns: 0.\r\n```\r\n\r\nI prepared a simplified sample code to reproduce the error:\r\n```\r\nval paramList = Seq(Seq[NamedParameter](\"minAge\" -> 43, \"maxHeight\" -> 180), Seq[NamedParameter](\"minAge\" -> 37, \"maxHeight\" -> 195))\r\nval query = BatchSql(SqlQuery(\"SELECT firstname, lastname FROM person WHERE age > {minAge} AND height < {maxHeight}\", List(\"minAge\", \"maxHeight\")), paramList)\r\nquery.execute()\r\n```\r\n\r\nIn my opinion the issue is that the query parameters are not parsed and still in the form `{}` instead of `?` when the batch parameters are applied to the prepared statement. At least this is the difference I saw compared to a normal query. \r\n\r\nSee method `fill` in https://github.com/playframework/playframework/blob/30d6d8c12908603f044d0071af6c2b1a80cab222/framework/src/anorm/src/main/scala/anorm/BatchSql.scala#L116-135","created_at":"2014-06-10T19:59:05Z","updated_at":"2014-06-10T20:03:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e88b2ee6eb51e1b9941a01b0e340806119cbcc52","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/playframework/playframework/pulls/3016/commits","review_comments_url":"https://api.github.com/repos/playframework/playframework/pulls/3016/comments","review_comment_url":"https://api.github.com/repos/playframework/playframework/pulls/comments/{number}","comments_url":"https://api.github.com/repos/playframework/playframework/issues/3016/comments","statuses_url":"https://api.github.com/repos/playframework/playframework/statuses/ab19e23e1db099c308fad01348dc2b045ce1fa71","head":{"label":"cchantep:fix-3016","ref":"fix-3016","sha":"ab19e23e1db099c308fad01348dc2b045ce1fa71","user":{"login":"cchantep","id":166062,"avatar_url":"https://avatars.githubusercontent.com/u/166062?","gravatar_id":"12e92f7dd3e8c432ca551cf263c89177","url":"https://api.github.com/users/cchantep","html_url":"https://github.com/cchantep","followers_url":"https://api.github.com/users/cchantep/followers","following_url":"https://api.github.com/users/cchantep/following{/other_user}","gists_url":"https://api.github.com/users/cchantep/gists{/gist_id}","starred_url":"https://api.github.com/users/cchantep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cchantep/subscriptions","organizations_url":"https://api.github.com/users/cchantep/orgs","repos_url":"https://api.github.com/users/cchantep/repos","events_url":"https://api.github.com/users/cchantep/events{/privacy}","received_events_url":"https://api.github.com/users/cchantep/received_events","type":"User","site_admin":false},"repo":{"id":14169038,"name":"playframework","full_name":"cchantep/playframework","owner":{"login":"cchantep","id":166062,"avatar_url":"https://avatars.githubusercontent.com/u/166062?","gravatar_id":"12e92f7dd3e8c432ca551cf263c89177","url":"https://api.github.com/users/cchantep","html_url":"https://github.com/cchantep","followers_url":"https://api.github.com/users/cchantep/followers","following_url":"https://api.github.com/users/cchantep/following{/other_user}","gists_url":"https://api.github.com/users/cchantep/gists{/gist_id}","starred_url":"https://api.github.com/users/cchantep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cchantep/subscriptions","organizations_url":"https://api.github.com/users/cchantep/orgs","repos_url":"https://api.github.com/users/cchantep/repos","events_url":"https://api.github.com/users/cchantep/events{/privacy}","received_events_url":"https://api.github.com/users/cchantep/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cchantep/playframework","description":"Play Framework","fork":true,"url":"https://api.github.com/repos/cchantep/playframework","forks_url":"https://api.github.com/repos/cchantep/playframework/forks","keys_url":"https://api.github.com/repos/cchantep/playframework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cchantep/playframework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cchantep/playframework/teams","hooks_url":"https://api.github.com/repos/cchantep/playframework/hooks","issue_events_url":"https://api.github.com/repos/cchantep/playframework/issues/events{/number}","events_url":"https://api.github.com/repos/cchantep/playframework/events","assignees_url":"https://api.github.com/repos/cchantep/playframework/assignees{/user}","branches_url":"https://api.github.com/repos/cchantep/playframework/branches{/branch}","tags_url":"https://api.github.com/repos/cchantep/playframework/tags","blobs_url":"https://api.github.com/repos/cchantep/playframework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cchantep/playframework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cchantep/playframework/git/refs{/sha}","trees_url":"https://api.github.com/repos/cchantep/playframework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cchantep/playframework/statuses/{sha}","languages_url":"https://api.github.com/repos/cchantep/playframework/languages","stargazers_url":"https://api.github.com/repos/cchantep/playframework/stargazers","contributors_url":"https://api.github.com/repos/cchantep/playframework/contributors","subscribers_url":"https://api.github.com/repos/cchantep/playframework/subscribers","subscription_url":"https://api.github.com/repos/cchantep/playframework/subscription","commits_url":"https://api.github.com/repos/cchantep/playframework/commits{/sha}","git_commits_url":"https://api.github.com/repos/cchantep/playframework/git/commits{/sha}","comments_url":"https://api.github.com/repos/cchantep/playframework/comments{/number}","issue_comment_url":"https://api.github.com/repos/cchantep/playframework/issues/comments/{number}","contents_url":"https://api.github.com/repos/cchantep/playframework/contents/{+path}","compare_url":"https://api.github.com/repos/cchantep/playframework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cchantep/playframework/merges","archive_url":"https://api.github.com/repos/cchantep/playframework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cchantep/playframework/downloads","issues_url":"https://api.github.com/repos/cchantep/playframework/issues{/number}","pulls_url":"https://api.github.com/repos/cchantep/playframework/pulls{/number}","milestones_url":"https://api.github.com/repos/cchantep/playframework/milestones{/number}","notifications_url":"https://api.github.com/repos/cchantep/playframework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cchantep/playframework/labels{/name}","releases_url":"https://api.github.com/repos/cchantep/playframework/releases{/id}","created_at":"2013-11-06T10:07:35Z","updated_at":"2014-06-10T19:58:45Z","pushed_at":"2014-06-10T19:58:46Z","git_url":"git://github.com/cchantep/playframework.git","ssh_url":"git@github.com:cchantep/playframework.git","clone_url":"https://github.com/cchantep/playframework.git","svn_url":"https://github.com/cchantep/playframework","homepage":"http://www.playframework.com/","size":69527,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"playframework:master","ref":"master","sha":"bd5be36035a34852f017e2c478fcd902c4a169c4","user":{"login":"playframework","id":319107,"avatar_url":"https://avatars.githubusercontent.com/u/319107?","gravatar_id":"8f606b24a39eeb8b9c64cad22befa099","url":"https://api.github.com/users/playframework","html_url":"https://github.com/playframework","followers_url":"https://api.github.com/users/playframework/followers","following_url":"https://api.github.com/users/playframework/following{/other_user}","gists_url":"https://api.github.com/users/playframework/gists{/gist_id}","starred_url":"https://api.github.com/users/playframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/playframework/subscriptions","organizations_url":"https://api.github.com/users/playframework/orgs","repos_url":"https://api.github.com/users/playframework/repos","events_url":"https://api.github.com/users/playframework/events{/privacy}","received_events_url":"https://api.github.com/users/playframework/received_events","type":"Organization","site_admin":false},"repo":{"id":2340549,"name":"playframework","full_name":"playframework/playframework","owner":{"login":"playframework","id":319107,"avatar_url":"https://avatars.githubusercontent.com/u/319107?","gravatar_id":"8f606b24a39eeb8b9c64cad22befa099","url":"https://api.github.com/users/playframework","html_url":"https://github.com/playframework","followers_url":"https://api.github.com/users/playframework/followers","following_url":"https://api.github.com/users/playframework/following{/other_user}","gists_url":"https://api.github.com/users/playframework/gists{/gist_id}","starred_url":"https://api.github.com/users/playframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/playframework/subscriptions","organizations_url":"https://api.github.com/users/playframework/orgs","repos_url":"https://api.github.com/users/playframework/repos","events_url":"https://api.github.com/users/playframework/events{/privacy}","received_events_url":"https://api.github.com/users/playframework/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/playframework/playframework","description":"Play Framework","fork":false,"url":"https://api.github.com/repos/playframework/playframework","forks_url":"https://api.github.com/repos/playframework/playframework/forks","keys_url":"https://api.github.com/repos/playframework/playframework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/playframework/playframework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/playframework/playframework/teams","hooks_url":"https://api.github.com/repos/playframework/playframework/hooks","issue_events_url":"https://api.github.com/repos/playframework/playframework/issues/events{/number}","events_url":"https://api.github.com/repos/playframework/playframework/events","assignees_url":"https://api.github.com/repos/playframework/playframework/assignees{/user}","branches_url":"https://api.github.com/repos/playframework/playframework/branches{/branch}","tags_url":"https://api.github.com/repos/playframework/playframework/tags","blobs_url":"https://api.github.com/repos/playframework/playframework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/playframework/playframework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/playframework/playframework/git/refs{/sha}","trees_url":"https://api.github.com/repos/playframework/playframework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/playframework/playframework/statuses/{sha}","languages_url":"https://api.github.com/repos/playframework/playframework/languages","stargazers_url":"https://api.github.com/repos/playframework/playframework/stargazers","contributors_url":"https://api.github.com/repos/playframework/playframework/contributors","subscribers_url":"https://api.github.com/repos/playframework/playframework/subscribers","subscription_url":"https://api.github.com/repos/playframework/playframework/subscription","commits_url":"https://api.github.com/repos/playframework/playframework/commits{/sha}","git_commits_url":"https://api.github.com/repos/playframework/playframework/git/commits{/sha}","comments_url":"https://api.github.com/repos/playframework/playframework/comments{/number}","issue_comment_url":"https://api.github.com/repos/playframework/playframework/issues/comments/{number}","contents_url":"https://api.github.com/repos/playframework/playframework/contents/{+path}","compare_url":"https://api.github.com/repos/playframework/playframework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/playframework/playframework/merges","archive_url":"https://api.github.com/repos/playframework/playframework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/playframework/playframework/downloads","issues_url":"https://api.github.com/repos/playframework/playframework/issues{/number}","pulls_url":"https://api.github.com/repos/playframework/playframework/pulls{/number}","milestones_url":"https://api.github.com/repos/playframework/playframework/milestones{/number}","notifications_url":"https://api.github.com/repos/playframework/playframework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/playframework/playframework/labels{/name}","releases_url":"https://api.github.com/repos/playframework/playframework/releases{/id}","created_at":"2011-09-07T09:24:08Z","updated_at":"2014-06-10T14:59:30Z","pushed_at":"2014-06-10T12:57:56Z","git_url":"git://github.com/playframework/playframework.git","ssh_url":"git@github.com:playframework/playframework.git","clone_url":"https://github.com/playframework/playframework.git","svn_url":"https://github.com/playframework/playframework","homepage":"http://www.playframework.com/","size":136470,"stargazers_count":4821,"watchers_count":4821,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"forks_count":1762,"mirror_url":null,"open_issues_count":300,"forks":1762,"open_issues":300,"watchers":4821,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/playframework/playframework/pulls/3016"},"html":{"href":"https://github.com/playframework/playframework/pull/3016"},"issue":{"href":"https://api.github.com/repos/playframework/playframework/issues/3016"},"comments":{"href":"https://api.github.com/repos/playframework/playframework/issues/3016/comments"},"review_comments":{"href":"https://api.github.com/repos/playframework/playframework/pulls/3016/comments"},"review_comment":{"href":"https://api.github.com/repos/playframework/playframework/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/playframework/playframework/pulls/3016/commits"},"statuses":{"href":"https://api.github.com/repos/playframework/playframework/statuses/ab19e23e1db099c308fad01348dc2b045ce1fa71"}}}}