{"action":"created","issue":{"url":"https://api.github.com/repos/Starcounter/Starcounter/issues/2362","repository_url":"https://api.github.com/repos/Starcounter/Starcounter","labels_url":"https://api.github.com/repos/Starcounter/Starcounter/issues/2362/labels{/name}","comments_url":"https://api.github.com/repos/Starcounter/Starcounter/issues/2362/comments","events_url":"https://api.github.com/repos/Starcounter/Starcounter/issues/2362/events","html_url":"https://github.com/Starcounter/Starcounter/issues/2362","id":46878028,"number":2362,"title":"Checking for null in SQL","user":{"login":"malx122","id":913374,"avatar_url":"https://avatars.githubusercontent.com/u/913374?v=3","gravatar_id":"","url":"https://api.github.com/users/malx122","html_url":"https://github.com/malx122","followers_url":"https://api.github.com/users/malx122/followers","following_url":"https://api.github.com/users/malx122/following{/other_user}","gists_url":"https://api.github.com/users/malx122/gists{/gist_id}","starred_url":"https://api.github.com/users/malx122/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malx122/subscriptions","organizations_url":"https://api.github.com/users/malx122/orgs","repos_url":"https://api.github.com/users/malx122/repos","events_url":"https://api.github.com/users/malx122/events{/privacy}","received_events_url":"https://api.github.com/users/malx122/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Starcounter/Starcounter/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/Starcounter/Starcounter/labels/Follow-up","name":"Follow-up","color":"e11d21"},{"url":"https://api.github.com/repos/Starcounter/Starcounter/labels/Old%20SQL","name":"Old SQL","color":"000000"},{"url":"https://api.github.com/repos/Starcounter/Starcounter/labels/P/High","name":"P/High","color":"eb6420"}],"state":"closed","locked":false,"assignee":{"login":"alemoi","id":208134,"avatar_url":"https://avatars.githubusercontent.com/u/208134?v=3","gravatar_id":"","url":"https://api.github.com/users/alemoi","html_url":"https://github.com/alemoi","followers_url":"https://api.github.com/users/alemoi/followers","following_url":"https://api.github.com/users/alemoi/following{/other_user}","gists_url":"https://api.github.com/users/alemoi/gists{/gist_id}","starred_url":"https://api.github.com/users/alemoi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alemoi/subscriptions","organizations_url":"https://api.github.com/users/alemoi/orgs","repos_url":"https://api.github.com/users/alemoi/repos","events_url":"https://api.github.com/users/alemoi/events{/privacy}","received_events_url":"https://api.github.com/users/alemoi/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Starcounter/Starcounter/milestones/51","html_url":"https://github.com/Starcounter/Starcounter/milestones/v2.x","labels_url":"https://api.github.com/repos/Starcounter/Starcounter/milestones/51/labels","id":602455,"number":51,"title":"v2.x","description":"","creator":{"login":"Starcounter-Jack","id":1219049,"avatar_url":"https://avatars.githubusercontent.com/u/1219049?v=3","gravatar_id":"","url":"https://api.github.com/users/Starcounter-Jack","html_url":"https://github.com/Starcounter-Jack","followers_url":"https://api.github.com/users/Starcounter-Jack/followers","following_url":"https://api.github.com/users/Starcounter-Jack/following{/other_user}","gists_url":"https://api.github.com/users/Starcounter-Jack/gists{/gist_id}","starred_url":"https://api.github.com/users/Starcounter-Jack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Starcounter-Jack/subscriptions","organizations_url":"https://api.github.com/users/Starcounter-Jack/orgs","repos_url":"https://api.github.com/users/Starcounter-Jack/repos","events_url":"https://api.github.com/users/Starcounter-Jack/events{/privacy}","received_events_url":"https://api.github.com/users/Starcounter-Jack/received_events","type":"User","site_admin":false},"open_issues":344,"closed_issues":484,"state":"open","created_at":"2014-03-19T09:04:00Z","updated_at":"2016-02-15T08:28:57Z","due_on":null,"closed_at":null},"comments":29,"created_at":"2014-10-27T07:45:51Z","updated_at":"2016-02-15T08:28:57Z","closed_at":"2016-02-15T08:28:57Z","body":"Hm, I thought I had done this before in many places but it doesnt seem to work now:\r\n```\r\n            int counter = 0;\r\n            foreach(Template tr in Db.SQL<Template>(\"SELECT t FROM Template t WHERE t.Parent=?\",null))\r\n            {\r\n                    counter++;\r\n            }\r\n```\r\nGives me a counter = 0, no errors\r\n\r\n```\r\n            int counter = 0;\r\n            foreach(Template tr in Db.SQL<Template>(\"SELECT t FROM Template t\"))\r\n            {\r\n                if (tr.Parent == null)\r\n                    counter++;\r\n            }\r\n```\r\nGives me a counter = 10, which is the result I was expecting from both examples.\r\n\r\nWhat is wrong?"},"comment":{"url":"https://api.github.com/repos/Starcounter/Starcounter/issues/comments/184109941","html_url":"https://github.com/Starcounter/Starcounter/issues/2362#issuecomment-184109941","issue_url":"https://api.github.com/repos/Starcounter/Starcounter/issues/2362","id":184109941,"user":{"login":"k-rus","id":1726044,"avatar_url":"https://avatars.githubusercontent.com/u/1726044?v=3","gravatar_id":"","url":"https://api.github.com/users/k-rus","html_url":"https://github.com/k-rus","followers_url":"https://api.github.com/users/k-rus/followers","following_url":"https://api.github.com/users/k-rus/following{/other_user}","gists_url":"https://api.github.com/users/k-rus/gists{/gist_id}","starred_url":"https://api.github.com/users/k-rus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k-rus/subscriptions","organizations_url":"https://api.github.com/users/k-rus/orgs","repos_url":"https://api.github.com/users/k-rus/repos","events_url":"https://api.github.com/users/k-rus/events{/privacy}","received_events_url":"https://api.github.com/users/k-rus/received_events","type":"User","site_admin":false},"created_at":"2016-02-15T08:28:57Z","updated_at":"2016-02-15T08:28:57Z","body":"I consider this issue as closed, since no bug is here. I fixed the test to succeed according current semantics and enabled it."}}