{"action":"opened","issue":{"url":"https://api.github.com/repos/Starcounter/starcounter.io/issues/114","labels_url":"https://api.github.com/repos/Starcounter/starcounter.io/issues/114/labels{/name}","comments_url":"https://api.github.com/repos/Starcounter/starcounter.io/issues/114/comments","events_url":"https://api.github.com/repos/Starcounter/starcounter.io/issues/114/events","html_url":"https://github.com/Starcounter/starcounter.io/issues/114","id":122730925,"number":114,"title":"SQL with GetType() fails","user":{"login":"pluppplupp","id":1765023,"avatar_url":"https://avatars.githubusercontent.com/u/1765023?v=3","gravatar_id":"","url":"https://api.github.com/users/pluppplupp","html_url":"https://github.com/pluppplupp","followers_url":"https://api.github.com/users/pluppplupp/followers","following_url":"https://api.github.com/users/pluppplupp/following{/other_user}","gists_url":"https://api.github.com/users/pluppplupp/gists{/gist_id}","starred_url":"https://api.github.com/users/pluppplupp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pluppplupp/subscriptions","organizations_url":"https://api.github.com/users/pluppplupp/orgs","repos_url":"https://api.github.com/users/pluppplupp/repos","events_url":"https://api.github.com/users/pluppplupp/events{/privacy}","received_events_url":"https://api.github.com/users/pluppplupp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-17T13:05:57Z","updated_at":"2015-12-17T13:05:57Z","closed_at":null,"body":"http://starcounter.io/guides/database/inheritance/\r\n\r\nDocumentation says:\r\n![2015-12-17_14-01-03](https://cloud.githubusercontent.com/assets/1765023/11870290/acf31552-a4c6-11e5-9890-d59d91445aac.png)\r\n\r\nSo I created:\r\n```\r\nnamespace starCounterTest\r\n{\r\n    using System.Runtime;\r\n\r\n    using Starcounter;\r\n\r\n    [Database]\r\n    public class Customer\r\n    {\r\n        public string Name { get; set; }\r\n    }\r\n\r\n    public class PrivateCustomer : Customer\r\n    {\r\n        public string Gender { get; set; }\r\n    }\r\n\r\n    public class CorporateCustomer : Customer\r\n    {\r\n        public string VatNo { get; set; }\r\n    }\r\n}\r\n```\r\nand created 2 instances:\r\n```\r\nDb.Scope(() =>\r\n\t{\r\n\t\tvar privateCustomer = new PrivateCustomer()\r\n\t\t\t\t\t\t\t\t  {\r\n\t\t\t\t\t\t\t\t\t  Gender = \"Male\",\r\n\t\t\t\t\t\t\t\t\t  Name = \"Jim Kay\"\r\n\t\t\t\t\t\t\t\t  };\r\n\r\n\t\tTransaction.Current.Commit();\r\n\t});\r\n\r\nDb.Scope(() =>\r\n{\r\n\tvar corporateCustomer = new CorporateCustomer()\r\n\t{\r\n\t\tVatNo = \"123\",\r\n\t\tName = \"Evil Corp\"\r\n\t};\r\n\r\n\tTransaction.Current.Commit();\r\n});\r\n```\r\nbut I cannot execute the query with ```GetType() == typeof(Customer)```\r\n\r\n![2015-12-17_13-47-18](https://cloud.githubusercontent.com/assets/1765023/11870274/783d15a6-a4c6-11e5-8fd0-71f554f41faa.png)\r\n![2015-12-17_13-49-04](https://cloud.githubusercontent.com/assets/1765023/11870277/7fff9c14-a4c6-11e5-9e2b-62bece3953d0.png)\r\n"}}