{"action":"created","comment":{"url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/pulls/comments/186146799","pull_request_review_id":117682783,"id":186146799,"diff_hunk":"@@ -772,5 +772,67 @@ public void TestTableValuedStoredFunctions()\n                 Assert.AreEqual(1, list2[0].Something);\n             }\n         }\n+\n+        [Test]\n+        public void Test_issue_60_and_62()\n+        {\n+            using (var context = new BloggingContext(ConnectionString))\n+            {\n+                context.Database.Log = Console.Out.WriteLine;\n+\n+                context.Blogs.Add( new Blog { Name = \"Hello\" });\n+                context.SaveChanges();\n+\n+                string stringValue = \"string_value\";\n+                var query = context.Blogs.Select(b => stringValue + \"_postfix\");\n+                var blogTitle = query.First();\n+                Assert.That(blogTitle, Is.EqualTo(\"string_value_postfix\"));\n+                Console.WriteLine(query.ToString());\n+                StringAssert.AreEqualIgnoringCase(\"SELECT  COALESCE( @p__linq__0,E'')  || E'_postfix' AS \\\"C1\\\" FROM \\\"dbo\\\".\\\"Blogs\\\" AS \\\"Extent1\\\"\", query.ToString());\n+            }\n+        }\n+\n+        [Test]\n+        public void TestNullPropagation_1()\n+        {\n+            using (var context = new BloggingContext(ConnectionString))\n+            {\n+                context.Database.Log = Console.Out.WriteLine;\n+\n+                context.Blogs.Add( new Blog { Name = \"Hello\" });\n+                context.SaveChanges();\n+\n+                string stringValue = \"string_value\";\n+                var query = context.Blogs.Select(b =>  (stringValue ?? \"default_value\") + \"_postfix\");\n+                var blog_title = query.First();\n+                Assert.That(blog_title, Is.EqualTo(\"string_value_postfix\"));\n+\n+                Console.WriteLine(query.ToString());\n+                StringAssert.AreEqualIgnoringCase(\"SELECT  CASE  WHEN ( COALESCE( @p__linq__0,E'default_value')  IS NULL) THEN (E'') WHEN (@p__linq__0 IS NULL) THEN (E'default_value') ELSE (@p__linq__0) END  || E'_postfix' AS \\\"C1\\\" FROM \\\"dbo\\\".\\\"Blogs\\\" AS \\\"Extent1\\\"\", query.ToString());\n+            }\n+        }\n+\n+        [Test]\n+        public void TestNullPropagation_2()","path":"test/EntityFramework6.Npgsql.Tests/EntityFrameworkBasicTests.cs","position":45,"original_position":45,"commit_id":"9522c2ed3cba026426be4f8ae24d2a6f8b2a3750","original_commit_id":"9522c2ed3cba026426be4f8ae24d2a6f8b2a3750","user":{"login":"rwasef1830","id":4632253,"avatar_url":"https://avatars0.githubusercontent.com/u/4632253?v=4","gravatar_id":"","url":"https://api.github.com/users/rwasef1830","html_url":"https://github.com/rwasef1830","followers_url":"https://api.github.com/users/rwasef1830/followers","following_url":"https://api.github.com/users/rwasef1830/following{/other_user}","gists_url":"https://api.github.com/users/rwasef1830/gists{/gist_id}","starred_url":"https://api.github.com/users/rwasef1830/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwasef1830/subscriptions","organizations_url":"https://api.github.com/users/rwasef1830/orgs","repos_url":"https://api.github.com/users/rwasef1830/repos","events_url":"https://api.github.com/users/rwasef1830/events{/privacy}","received_events_url":"https://api.github.com/users/rwasef1830/received_events","type":"User","site_admin":false},"body":"Test needs a better name, maybe: Test_string_multiple_null_propagation","created_at":"2018-05-04T17:05:50Z","updated_at":"2018-05-04T17:06:53Z","html_url":"https://github.com/npgsql/EntityFramework6.Npgsql/pull/93#discussion_r186146799","pull_request_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/pulls/93","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/pulls/comments/186146799"},"html":{"href":"https://github.com/npgsql/EntityFramework6.Npgsql/pull/93#discussion_r186146799"},"pull_request":{"href":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/pulls/93"}}},"pull_request":{"url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/pulls/93","id":184910885,"html_url":"https://github.com/npgsql/EntityFramework6.Npgsql/pull/93","diff_url":"https://github.com/npgsql/EntityFramework6.Npgsql/pull/93.diff","patch_url":"https://github.com/npgsql/EntityFramework6.Npgsql/pull/93.patch","issue_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/issues/93","number":93,"state":"open","locked":false,"title":"Translate 'case when X is null...' to 'coalesce(X,...)'","user":{"login":"bgurmendi","id":1327625,"avatar_url":"https://avatars2.githubusercontent.com/u/1327625?v=4","gravatar_id":"","url":"https://api.github.com/users/bgurmendi","html_url":"https://github.com/bgurmendi","followers_url":"https://api.github.com/users/bgurmendi/followers","following_url":"https://api.github.com/users/bgurmendi/following{/other_user}","gists_url":"https://api.github.com/users/bgurmendi/gists{/gist_id}","starred_url":"https://api.github.com/users/bgurmendi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgurmendi/subscriptions","organizations_url":"https://api.github.com/users/bgurmendi/orgs","repos_url":"https://api.github.com/users/bgurmendi/repos","events_url":"https://api.github.com/users/bgurmendi/events{/privacy}","received_events_url":"https://api.github.com/users/bgurmendi/received_events","type":"User","site_admin":false},"body":"This changes solves most cases of #62 #60 #87 #90","created_at":"2018-04-30T09:22:25Z","updated_at":"2018-05-04T17:06:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e372a5dc14ea76e7fea65ce36d35cf393abbfb67","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/pulls/93/commits","review_comments_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/pulls/93/comments","review_comment_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/pulls/comments{/number}","comments_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/issues/93/comments","statuses_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/statuses/9522c2ed3cba026426be4f8ae24d2a6f8b2a3750","head":{"label":"bgurmendi:fix_Error_sql_42P18_issue_62_and_60","ref":"fix_Error_sql_42P18_issue_62_and_60","sha":"9522c2ed3cba026426be4f8ae24d2a6f8b2a3750","user":{"login":"bgurmendi","id":1327625,"avatar_url":"https://avatars2.githubusercontent.com/u/1327625?v=4","gravatar_id":"","url":"https://api.github.com/users/bgurmendi","html_url":"https://github.com/bgurmendi","followers_url":"https://api.github.com/users/bgurmendi/followers","following_url":"https://api.github.com/users/bgurmendi/following{/other_user}","gists_url":"https://api.github.com/users/bgurmendi/gists{/gist_id}","starred_url":"https://api.github.com/users/bgurmendi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgurmendi/subscriptions","organizations_url":"https://api.github.com/users/bgurmendi/orgs","repos_url":"https://api.github.com/users/bgurmendi/repos","events_url":"https://api.github.com/users/bgurmendi/events{/privacy}","received_events_url":"https://api.github.com/users/bgurmendi/received_events","type":"User","site_admin":false},"repo":{"id":130832119,"name":"EntityFramework6.Npgsql","full_name":"bgurmendi/EntityFramework6.Npgsql","owner":{"login":"bgurmendi","id":1327625,"avatar_url":"https://avatars2.githubusercontent.com/u/1327625?v=4","gravatar_id":"","url":"https://api.github.com/users/bgurmendi","html_url":"https://github.com/bgurmendi","followers_url":"https://api.github.com/users/bgurmendi/followers","following_url":"https://api.github.com/users/bgurmendi/following{/other_user}","gists_url":"https://api.github.com/users/bgurmendi/gists{/gist_id}","starred_url":"https://api.github.com/users/bgurmendi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgurmendi/subscriptions","organizations_url":"https://api.github.com/users/bgurmendi/orgs","repos_url":"https://api.github.com/users/bgurmendi/repos","events_url":"https://api.github.com/users/bgurmendi/events{/privacy}","received_events_url":"https://api.github.com/users/bgurmendi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bgurmendi/EntityFramework6.Npgsql","description":"Entity Framework 6 (and 5) provider for PostgreSQL","fork":true,"url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql","forks_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/forks","keys_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/teams","hooks_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/hooks","issue_events_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/issues/events{/number}","events_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/events","assignees_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/assignees{/user}","branches_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/branches{/branch}","tags_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/tags","blobs_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/git/refs{/sha}","trees_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/statuses/{sha}","languages_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/languages","stargazers_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/stargazers","contributors_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/contributors","subscribers_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/subscribers","subscription_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/subscription","commits_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/commits{/sha}","git_commits_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/git/commits{/sha}","comments_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/comments{/number}","issue_comment_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/issues/comments{/number}","contents_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/contents/{+path}","compare_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/merges","archive_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/downloads","issues_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/issues{/number}","pulls_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/pulls{/number}","milestones_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/milestones{/number}","notifications_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/labels{/name}","releases_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/releases{/id}","deployments_url":"https://api.github.com/repos/bgurmendi/EntityFramework6.Npgsql/deployments","created_at":"2018-04-24T09:46:31Z","updated_at":"2018-04-24T09:46:33Z","pushed_at":"2018-05-03T15:10:00Z","git_url":"git://github.com/bgurmendi/EntityFramework6.Npgsql.git","ssh_url":"git@github.com:bgurmendi/EntityFramework6.Npgsql.git","clone_url":"https://github.com/bgurmendi/EntityFramework6.Npgsql.git","svn_url":"https://github.com/bgurmendi/EntityFramework6.Npgsql","homepage":null,"size":361,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"npgsql:dev","ref":"dev","sha":"c1cf25518173944a9f5044af611c8eccd3af4cd7","user":{"login":"npgsql","id":5766497,"avatar_url":"https://avatars2.githubusercontent.com/u/5766497?v=4","gravatar_id":"","url":"https://api.github.com/users/npgsql","html_url":"https://github.com/npgsql","followers_url":"https://api.github.com/users/npgsql/followers","following_url":"https://api.github.com/users/npgsql/following{/other_user}","gists_url":"https://api.github.com/users/npgsql/gists{/gist_id}","starred_url":"https://api.github.com/users/npgsql/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npgsql/subscriptions","organizations_url":"https://api.github.com/users/npgsql/orgs","repos_url":"https://api.github.com/users/npgsql/repos","events_url":"https://api.github.com/users/npgsql/events{/privacy}","received_events_url":"https://api.github.com/users/npgsql/received_events","type":"Organization","site_admin":false},"repo":{"id":58261173,"name":"EntityFramework6.Npgsql","full_name":"npgsql/EntityFramework6.Npgsql","owner":{"login":"npgsql","id":5766497,"avatar_url":"https://avatars2.githubusercontent.com/u/5766497?v=4","gravatar_id":"","url":"https://api.github.com/users/npgsql","html_url":"https://github.com/npgsql","followers_url":"https://api.github.com/users/npgsql/followers","following_url":"https://api.github.com/users/npgsql/following{/other_user}","gists_url":"https://api.github.com/users/npgsql/gists{/gist_id}","starred_url":"https://api.github.com/users/npgsql/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npgsql/subscriptions","organizations_url":"https://api.github.com/users/npgsql/orgs","repos_url":"https://api.github.com/users/npgsql/repos","events_url":"https://api.github.com/users/npgsql/events{/privacy}","received_events_url":"https://api.github.com/users/npgsql/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/npgsql/EntityFramework6.Npgsql","description":"Entity Framework 6 (and 5) provider for PostgreSQL","fork":false,"url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql","forks_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/forks","keys_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/teams","hooks_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/hooks","issue_events_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/issues/events{/number}","events_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/events","assignees_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/assignees{/user}","branches_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/branches{/branch}","tags_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/tags","blobs_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/git/refs{/sha}","trees_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/statuses/{sha}","languages_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/languages","stargazers_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/stargazers","contributors_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/contributors","subscribers_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/subscribers","subscription_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/subscription","commits_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/commits{/sha}","git_commits_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/git/commits{/sha}","comments_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/comments{/number}","issue_comment_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/issues/comments{/number}","contents_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/contents/{+path}","compare_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/merges","archive_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/downloads","issues_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/issues{/number}","pulls_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/pulls{/number}","milestones_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/milestones{/number}","notifications_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/labels{/name}","releases_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/releases{/id}","deployments_url":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/deployments","created_at":"2016-05-07T10:30:31Z","updated_at":"2018-04-10T15:01:05Z","pushed_at":"2018-05-03T15:10:01Z","git_url":"git://github.com/npgsql/EntityFramework6.Npgsql.git","ssh_url":"git@github.com:npgsql/EntityFramework6.Npgsql.git","clone_url":"https://github.com/npgsql/EntityFramework6.Npgsql.git","svn_url":"https://github.com/npgsql/EntityFramework6.Npgsql","homepage":null,"size":367,"stargazers_count":21,"watchers_count":21,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"archived":false,"open_issues_count":65,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":17,"open_issues":65,"watchers":21,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/pulls/93"},"html":{"href":"https://github.com/npgsql/EntityFramework6.Npgsql/pull/93"},"issue":{"href":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/issues/93"},"comments":{"href":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/issues/93/comments"},"review_comments":{"href":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/pulls/93/comments"},"review_comment":{"href":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/pulls/93/commits"},"statuses":{"href":"https://api.github.com/repos/npgsql/EntityFramework6.Npgsql/statuses/9522c2ed3cba026426be4f8ae24d2a6f8b2a3750"}},"author_association":"NONE"}}
{"actor":{"display_login":"rwasef1830"}}