{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/EntityFrameworkCore/issues/11790","repository_url":"https://api.github.com/repos/aspnet/EntityFrameworkCore","labels_url":"https://api.github.com/repos/aspnet/EntityFrameworkCore/issues/11790/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/EntityFrameworkCore/issues/11790/comments","events_url":"https://api.github.com/repos/aspnet/EntityFrameworkCore/issues/11790/events","html_url":"https://github.com/aspnet/EntityFrameworkCore/issues/11790","id":317014270,"number":11790,"title":"QueryTypes: improve valiation/exception messages for invalid scenarios around QTs","user":{"login":"maumar","id":1591930,"avatar_url":"https://avatars3.githubusercontent.com/u/1591930?v=4","gravatar_id":"","url":"https://api.github.com/users/maumar","html_url":"https://github.com/maumar","followers_url":"https://api.github.com/users/maumar/followers","following_url":"https://api.github.com/users/maumar/following{/other_user}","gists_url":"https://api.github.com/users/maumar/gists{/gist_id}","starred_url":"https://api.github.com/users/maumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maumar/subscriptions","organizations_url":"https://api.github.com/users/maumar/orgs","repos_url":"https://api.github.com/users/maumar/repos","events_url":"https://api.github.com/users/maumar/events{/privacy}","received_events_url":"https://api.github.com/users/maumar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-23T23:09:41Z","updated_at":"2018-04-23T23:12:26Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"e.g. We don't support scenario where QueryType contains a reference to collection of entities.\r\n\r\nrepro:\r\n\r\n```cs\r\n    class Program\r\n    {\r\n        static void Main(string[] args)\r\n        {\r\n            Console.WriteLine(\"Hello World!\");\r\n\r\n            using (var ctx = new MyContext())\r\n            {\r\n                ctx.Database.EnsureDeleted();\r\n                ctx.Database.EnsureCreated();\r\n            }\r\n        }\r\n    }\r\n\r\n    public class MyContext : DbContext\r\n    {\r\n        public DbSet<Faction> Factions { get; set; }\r\n        public DbSet<Leader> Leaders { get; set; }\r\n\r\n        public DbQuery<LeaderQuery> LeadersQuery { get; set; }\r\n        public DbQuery<FactionQuery> FactionsQuery { get; set; }\r\n\r\n        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)\r\n        {\r\n            optionsBuilder.UseSqlServer(@\"Server=.;Database=QueryTypesRepro;Trusted_Connection=True;MultipleActiveResultSets=True\");\r\n        }\r\n    }\r\n\r\n    public class Faction\r\n    {\r\n        public int Id { get; set; }\r\n        public string Name { get; set; }\r\n\r\n        public List<Leader> Leaders { get; set; }\r\n    }\r\n\r\n    public class FactionQuery\r\n    {\r\n        public string Name { get; set; }\r\n        public List<Leader> Leaders { get; set; }\r\n    }\r\n\r\n    public class Leader\r\n    {\r\n        public int Id { get; set; }\r\n        public string Name { get; set; }\r\n        public Faction Faction { get; set; }\r\n    }\r\n\r\n    public class LeaderQuery\r\n    {\r\n        public string Name { get; set; }\r\n        public Faction Faction { get; set; }\r\n    }\r\n```\r\n\r\nException:\r\n\r\n```\r\nUnable to determine the relationship represented by navigation property 'FactionQuery.Leaders' of type 'List<Leader>'. Either manually configure the relationship, or ignore this property using the '[NotMapped]' attribute or by using 'EntityTypeBuilder.Ignore' in 'OnModelCreating'.\r\n```"},"comment":{"url":"https://api.github.com/repos/aspnet/EntityFrameworkCore/issues/comments/383751369","html_url":"https://github.com/aspnet/EntityFrameworkCore/issues/11790#issuecomment-383751369","issue_url":"https://api.github.com/repos/aspnet/EntityFrameworkCore/issues/11790","id":383751369,"user":{"login":"smitpatel","id":1528107,"avatar_url":"https://avatars0.githubusercontent.com/u/1528107?v=4","gravatar_id":"","url":"https://api.github.com/users/smitpatel","html_url":"https://github.com/smitpatel","followers_url":"https://api.github.com/users/smitpatel/followers","following_url":"https://api.github.com/users/smitpatel/following{/other_user}","gists_url":"https://api.github.com/users/smitpatel/gists{/gist_id}","starred_url":"https://api.github.com/users/smitpatel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smitpatel/subscriptions","organizations_url":"https://api.github.com/users/smitpatel/orgs","repos_url":"https://api.github.com/users/smitpatel/repos","events_url":"https://api.github.com/users/smitpatel/events{/privacy}","received_events_url":"https://api.github.com/users/smitpatel/received_events","type":"User","site_admin":false},"created_at":"2018-04-23T23:12:26Z","updated_at":"2018-04-23T23:12:26Z","author_association":"CONTRIBUTOR","body":"What should be the improvement here? Should it be something indicating \"collection navs\" are not supported?"}}
{"actor":{"display_login":"smitpatel"}}