-
Notifications
You must be signed in to change notification settings - Fork 256
Sync to EF 11.0.0-preview.4.26210.110 #3809
New issue
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
137 changes: 137 additions & 0 deletions
137
...Core.PG.FunctionalTests/Query/Associations/Navigations/NavigationsBulkUpdateNpgsqlTest.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,137 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| using Xunit.Sdk; | ||
|
|
||
| namespace Microsoft.EntityFrameworkCore.Query.Associations.Navigations; | ||
|
|
||
| public class NavigationsBulkUpdateNpgsqlTest(NavigationsNpgsqlFixture fixture, ITestOutputHelper testOutputHelper) | ||
| : NavigationsBulkUpdateRelationalTestBase<NavigationsNpgsqlFixture>(fixture, testOutputHelper) | ||
| { | ||
| [ConditionalFact] | ||
| public virtual void Check_all_tests_overridden() | ||
| => TestHelpers.AssertAllMethodsOverridden(GetType()); | ||
|
|
||
| // FK constraint failures | ||
| public override Task Delete_entity_with_associations() | ||
| => Assert.ThrowsAsync<PostgresException>(base.Delete_entity_with_associations); | ||
|
|
||
| public override Task Delete_required_associate() | ||
| => Assert.ThrowsAsync<PostgresException>(base.Delete_required_associate); | ||
|
|
||
| public override Task Delete_optional_associate() | ||
| => Assert.ThrowsAsync<PostgresException>(base.Delete_optional_associate); | ||
|
|
||
| // PostgreSQL generates valid SQL for these but produces wrong row counts due to self-joins in UPDATE ... FROM | ||
| public override Task Update_property_inside_associate() | ||
| => Assert.ThrowsAsync<EqualException>(base.Update_property_inside_associate); | ||
|
|
||
| public override Task Update_property_inside_associate_with_special_chars() | ||
| => Assert.ThrowsAsync<EqualException>(base.Update_property_inside_associate_with_special_chars); | ||
|
|
||
| public override Task Update_property_on_projected_associate() | ||
| => Assert.ThrowsAsync<EqualException>(base.Update_property_on_projected_associate); | ||
|
|
||
| public override Task Update_property_on_projected_associate_with_OrderBy_Skip() | ||
| => Assert.ThrowsAsync<EqualException>(base.Update_property_on_projected_associate_with_OrderBy_Skip); | ||
|
|
||
| public override Task Update_multiple_properties_inside_same_associate() | ||
| => Assert.ThrowsAsync<EqualException>(base.Update_multiple_properties_inside_same_associate); | ||
|
|
||
| public override Task Update_primitive_collection_to_constant() | ||
| => Assert.ThrowsAsync<EqualException>(base.Update_primitive_collection_to_constant); | ||
|
|
||
| public override Task Update_primitive_collection_to_parameter() | ||
| => Assert.ThrowsAsync<EqualException>(base.Update_primitive_collection_to_parameter); | ||
|
|
||
| // Translation not yet supported for navigation-mapped associations | ||
| public override Task Update_associate_to_parameter() | ||
| => Assert.ThrowsAsync<InvalidOperationException>(base.Update_associate_to_parameter); | ||
|
|
||
| public override Task Update_associate_to_inline() | ||
| => Assert.ThrowsAsync<InvalidOperationException>(base.Update_associate_to_inline); | ||
|
|
||
| public override Task Update_associate_to_inline_with_lambda() | ||
| => Assert.ThrowsAsync<InvalidOperationException>(base.Update_associate_to_inline_with_lambda); | ||
|
|
||
| public override Task Update_associate_to_another_associate() | ||
| => Assert.ThrowsAsync<InvalidOperationException>(base.Update_associate_to_another_associate); | ||
|
|
||
| public override Task Update_associate_to_null() | ||
| => Assert.ThrowsAsync<InvalidOperationException>(base.Update_associate_to_null); | ||
|
|
||
| public override Task Update_associate_to_null_with_lambda() | ||
| => Assert.ThrowsAsync<InvalidOperationException>(base.Update_associate_to_null_with_lambda); | ||
|
|
||
| public override Task Update_associate_to_null_parameter() | ||
| => Assert.ThrowsAsync<InvalidOperationException>(base.Update_associate_to_null_parameter); | ||
|
|
||
| public override Task Update_nested_associate_to_parameter() | ||
| => Assert.ThrowsAsync<InvalidOperationException>(base.Update_nested_associate_to_parameter); | ||
|
|
||
| public override Task Update_nested_associate_to_inline_with_lambda() | ||
| => Assert.ThrowsAsync<InvalidOperationException>(base.Update_nested_associate_to_inline_with_lambda); | ||
|
|
||
| public override Task Update_nested_associate_to_another_nested_associate() | ||
| => Assert.ThrowsAsync<InvalidOperationException>(base.Update_nested_associate_to_another_nested_associate); | ||
|
|
||
| public override Task Update_nested_collection_to_parameter() | ||
| => Assert.ThrowsAsync<InvalidOperationException>(base.Update_nested_collection_to_parameter); | ||
|
|
||
| public override Task Update_nested_collection_to_inline_with_lambda() | ||
| => Assert.ThrowsAsync<InvalidOperationException>(base.Update_nested_collection_to_inline_with_lambda); | ||
|
|
||
| public override Task Update_nested_collection_to_another_nested_collection() | ||
| => Assert.ThrowsAsync<InvalidOperationException>(base.Update_nested_collection_to_another_nested_collection); | ||
|
|
||
| public override Task Update_collection_to_parameter() | ||
| => Assert.ThrowsAsync<InvalidOperationException>(base.Update_collection_to_parameter); | ||
|
|
||
| public override Task Update_collection_referencing_the_original_collection() | ||
| => Assert.ThrowsAsync<InvalidOperationException>(base.Update_collection_referencing_the_original_collection); | ||
|
|
||
| public override Task Update_primitive_collection_to_another_collection() | ||
| => Assert.ThrowsAsync<InvalidOperationException>(base.Update_primitive_collection_to_another_collection); | ||
|
|
||
| public override Task Update_inside_structural_collection() | ||
| => Assert.ThrowsAsync<InvalidOperationException>(base.Update_inside_structural_collection); | ||
|
|
||
| public override Task Update_multiple_properties_inside_associates_and_on_entity_type() | ||
| => Assert.ThrowsAsync<InvalidOperationException>(base.Update_multiple_properties_inside_associates_and_on_entity_type); | ||
|
|
||
| public override Task Update_multiple_projected_associates_via_anonymous_type() | ||
| => Assert.ThrowsAsync<InvalidOperationException>(base.Update_multiple_projected_associates_via_anonymous_type); | ||
|
|
||
| public override async Task Update_property_inside_nested_associate() | ||
| { | ||
| await base.Update_property_inside_nested_associate(); | ||
|
|
||
| AssertExecuteUpdateSql( | ||
| """ | ||
| @p='foo_updated' | ||
|
|
||
| UPDATE "NestedAssociateType" AS n | ||
| SET "String" = @p | ||
| FROM "RootEntity" AS r | ||
| INNER JOIN "AssociateType" AS a ON r."RequiredAssociateId" = a."Id" | ||
| WHERE a."RequiredNestedAssociateId" = n."Id" | ||
| """); | ||
| } | ||
|
|
||
| public override async Task Update_associate_with_null_required_property() | ||
| { | ||
| await base.Update_associate_with_null_required_property(); | ||
|
|
||
| AssertExecuteUpdateSql(); | ||
| } | ||
|
|
||
| public override async Task Update_required_nested_associate_to_null() | ||
| { | ||
| await base.Update_required_nested_associate_to_null(); | ||
|
|
||
| AssertExecuteUpdateSql(); | ||
| } | ||
|
|
||
| public override Task Update_inside_primitive_collection() | ||
| => Assert.ThrowsAsync<InvalidOperationException>(base.Update_inside_primitive_collection); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.