Is there an existing issue for this?
Product
Hot Chocolate
Describe the bug
The projection middleware is generating this query:
DbSet<User>()
.Where(u => u.Id == __query_EntityId_0)
.Select(_s1 => new User{
Id = _s1.Id,
Username = _s1.Username,
EmailAddress = _s1.EmailAddress,
AccountStatus = _s1.AccountStatus != null ? new UserAccountStatus{ IsRegistrationCompleted = _s1.AccountStatus.IsRegistrationCompleted }
: null
}
)
Which results in an EF Core 8 exception when using complex types:
System.InvalidOperationException: Comparing complex types to null is not supported.
User.AccountStatus is non-nullable, so it shouldn't be checking for null like this.
Steps to reproduce
I'll provide a reproduction repository if it helps, but it's probably not necessary.
Relevant log output
No response
Additional Context?
No response
Version
13.5.1
Is there an existing issue for this?
Product
Hot Chocolate
Describe the bug
The projection middleware is generating this query:
Which results in an EF Core 8 exception when using complex types:
User.AccountStatusis non-nullable, so it shouldn't be checking for null like this.Steps to reproduce
I'll provide a reproduction repository if it helps, but it's probably not necessary.
Relevant log output
No response
Additional Context?
No response
Version
13.5.1