We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is another bug in a series of issues related to projecting out owned types in various ways (#31696, #34067):
_ = await context.Employee .Select(x => x.User.Emails) .SingleAsync();
await using var context = new CosmosDbContext(); await context.Database.EnsureDeletedAsync(); await context.Database.EnsureCreatedAsync(); context.Employee.Add(new() { id = "1", User = new() { Name = "John", Emails = [ new() { EmailAdress = "john@1.com", Type = "A"}, new() { EmailAdress = "john@2.com", Type = "B"} ] } }); await context.SaveChangesAsync(); context.ChangeTracker.Clear(); _ = await context.Employee .Select(x => x.User.Emails) .SingleAsync(); public class CosmosDbContext : DbContext { public DbSet<RootObject> Employee { get; set; } protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) => optionsBuilder .UseCosmos( "https://192.168.64.6:8081", "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==", "Test", o => o.HttpClientFactory(() => new HttpClient( new HttpClientHandler { ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator })) .ConnectionMode(ConnectionMode.Gateway)) .UseQueryTrackingBehavior(QueryTrackingBehavior.NoTracking) .LogTo(Console.WriteLine, LogLevel.Information) .EnableSensitiveDataLogging(); protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity<RootObject>().ToContainer("DummyContainer"); modelBuilder.Entity<RootObject>().HasNoDiscriminator(); } } public class RootObject { public string id { get; set; } public User User { get; set; } public string _rid { get; set; } public string _self { get; set; } public string _etag { get; set; } public string _attachments { get; set; } public int _ts { get; set; } } public class User { public string Name { get; set; } public ICollection<Emails> Emails { get; set; } } public class Emails { public string EmailAdress { get; set; } public string Type { get; set; } } public class EmployeeDTO { public string Id { get; set; } public string Name { get; set; } public ICollection<Emails> Emails { get; set; } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This is another bug in a series of issues related to projecting out owned types in various ways (#31696, #34067):
Repro
The text was updated successfully, but these errors were encountered: