I have boiled down my error to the following. If I have simple models like so :
class Person
{
public int Id { get; set; }
public ICollection<Class> Classes { get; set; }
public ICollection<Address> Addresses { get; set; }
}
class Class
{
}
class Address
{
}
And then I write EF code that does multiple includes :
_context.Persons
.Include(x => x.Classes)
.ThenInclude(x => x.Person)
.ThenInclude(x => x.Addresses);
I get this error when I didn't get it on .NET 5 :
"System.InvalidOperationException: An error was generated for warning 'Microsoft.EntityFrameworkCore.Query.NavigationBaseIncludeIgnored': The navigation '' was ignored from 'Include' in the query since the fix-up will automatically populate it. If any further navigations are specified in 'Include' afterwards then they will be ignored. Walking back include tree is not allowed. This exception can be suppressed or logged by passing event ID 'CoreEventId.NavigationBaseIncludeIgnored' to the 'ConfigureWarnings' method in 'DbContext.OnConfiguring' or 'AddDbContext'."