You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unhandled exception. System.Collections.Generic.KeyNotFoundException: The given key 'DefaultTable: Blog' was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression.GenerateComplexPropertyShaperExpression(StructuralTypeProjectionExpression containerProjection, IComplexProperty complexProperty) in /Users/roji/projects/efcore/src/EFCore.Relational/Query/SqlExpressions/SelectExpression.cs:line 2672
at Microsoft.EntityFrameworkCore.Query.StructuralTypeProjectionExpression.BindComplexProperty(IComplexProperty complexProperty) in /Users/roji/projects/efcore/src/EFCore.Relational/Query/StructuralTypeProjectionExpression.cs:line 375
at Microsoft.EntityFrameworkCore.Query.RelationalSqlTranslatingExpressionVisitor.BindComplexProperty(StructuralTypeReferenceExpression typeReference, IComplexProperty complexProperty) in /Users/roji/projects/efcore/src/EFCore.Relational/Query/RelationalSqlTranslatingExpressionVisitor.cs:line 1331
at Microsoft.EntityFrameworkCore.Query.RelationalSqlTranslatingExpressionVisitor.TryBindMember(Expression source, MemberIdentity member, Expression& expression, IPropertyBase& property) in /Users/roji/projects/efcore/src/EFCore.Relational/Query/RelationalSqlTranslatingExpressionVisitor.cs:line 1208
This is because calling GetViewOrTableMappings() on the complex type returns only the table mapping - this seems like a metadata issue.
Once this fixed, GenerateComplexPropertyShaperExpression would need to be fixed to support this scenario as well.
The text was updated successfully, but these errors were encountered:
The metadata support is already covered by #34627. Once that's done, this issue tracks doing the proper adjustments to GenerateComplexPropertyShaperExpression.
Adjustments will also be needed for property handling of ExecuteUpdate when a complex type is referenced as the property to change, and there's a view mapping; see test Update_complex_type_type_with_view_mapping.
The following code:
... throws:
This is because calling GetViewOrTableMappings() on the complex type returns only the table mapping - this seems like a metadata issue.
Once this fixed, GenerateComplexPropertyShaperExpression would need to be fixed to support this scenario as well.
The text was updated successfully, but these errors were encountered: