Efcore: Scrub code for uses of navigations that don't cover skip navigations

Created on 4 Oct 2020  路  2Comments  路  Source: dotnet/efcore

  • [x] GetNavigations without GetSkipNavigations:

    • [x] [CosmosModelValidator.ValidateDatabaseProperties](https://github.com/dotnet/efcore/blob/main/src/EFCore.Cosmos/Infrastructure/Internal/CosmosModelValidator.cs#L304)

    • [x] [DocumentSource.CreateDocument](https://github.com/dotnet/efcore/blob/main/src/EFCore.Cosmos/Update/Internal/DocumentSource.cs#L97)

    • [x] [ModelValidator.ValidateQueryFilters](https://github.com/dotnet/efcore/blob/main/src/EFCore/Infrastructure/ModelValidator.cs#L1021)

    • [x] [ModelValidator.ValidateData](https://github.com/dotnet/efcore/blob/main/src/EFCore/Infrastructure/ModelValidator.cs#L1109)

  • [x] FindNavigation without FindSkipNavigation:

    • [x] [EntityProjectionExpression.BindMember](https://github.com/dotnet/efcore/blob/main/src/EFCore.Cosmos/Query/Internal/EntityProjectionExpression.cs#L207)

    • [x] [InMemoryQueryableMethodTranslatingExpressionVisitor.TryExpand](https://github.com/dotnet/efcore/blob/main/src/EFCore.InMemory/Query/Internal/InMemoryQueryableMethodTranslatingExpressionVisitor.cs#L1366)

    • [x] [RelationalQueryableMethodTranslatingExpressionVisitor.TryExpand](https://github.com/dotnet/efcore/blob/main/src/EFCore.Relational/Query/RelationalQueryableMethodTranslatingExpressionVisitor.cs#L1308)

    • [x] [EntityTypeExtensions.GetProperty](https://github.com/dotnet/efcore/blob/main/src/EFCore/Extensions/EntityTypeExtensions.cs#L637)

  • [x] GetPropertiesAndNavigations (Should it return skip navs too?)

    • [x] [SnapshotFactoryFactory.CreateConstructorExpression](https://github.com/dotnet/efcore/blob/main/src/EFCore/ChangeTracking/Internal/SnapshotFactoryFactory.cs#L55)

    • [x] [EntityType.GetSeedData](https://github.com/dotnet/efcore/blob/main/src/EFCore/Metadata/Internal/EntityType.cs#L2939)

Servicing-approved area-global closed-fixed type-bug

All 2 comments

Skip navigations are not valid for cosmos. BindMember method is changing in 6.0
TryExpand methods are for expanding navigations to weak/owned entities. SkipNavigations are not valid for them either.

Query Filter validation is to warn when we do inner join which relies on the fact there are no orphans in presence of query filters for a required relationship is present. That case is not applicable to skip navigations.

Was this page helpful?
0 / 5 - 0 ratings