Upgrade to Entity Framework 10#2041
Closed
ffquintella wants to merge 14 commits into
Closed
Conversation
Recompile the provider against EF Core 10.0 and move the runtime target frameworks to net10.0 (tests likewise). Branding set to 10.0.0-preview.1. Provider (src) changes for EF Core 10 API breaks: - Query pipeline: RelationalParameterBasedSqlProcessor.Optimize() is obsolete; override Process(Expression, ParametersCacheDecorator) instead. Parameter values are now read through ParametersCacheDecorator. Updated MySqlParameterBasedSqlProcessor, SkipTakeCollapsingExpressionVisitor and MySqlParameterInliningExpressionVisitor accordingly. - Implement new abstract SqlExpressionVisitor.VisitRightJoin. - IsValidSelectExpressionForExecuteDelete is now a single-parameter overload. - RelationalQueryCompilationContext ctor / IQueryCompilationContextFactory .CreatePrecompiled no longer take nonNullableReferenceTypeParameters. - QueryCompilationContext.QueryParameterPrefix removed and parameter naming reworked; use SqlParameterExpression.InvariantName and QueryContext.Parameters. - TranslateParameterizedCollectionsToConstants() -> UseParameterizedCollectionMode. - Shared Check.cs updated for parameterless AbstractionsStrings resources. Packages: EFCoreVersion -> [10.0.0,10.0.999]; Microsoft.Extensions/AspNetCore/ System.Text.Json/etc. -> 10.0.0; Roslyn 4.14.0; xunit 2.9.3 / runner.vs 3.1.3; NetTopologySuite 2.6.0; Castle.Core 5.2.1. Enabled central transitive pinning and pinned System.Security.Cryptography.Xml 10.0.8 (CVE). Tests ported to EF Core 10 spec-test API changes: async-only query tests, tests removed/moved into *TranslationsTestBase classes, the NonSharedFixture ctor parameter on non-shared test bases, RelationalConnection/CommandBuilder dependency and RelationalCommand logCommandText changes, and IAsyncDisposable-only test stores. SQL baselines reconciled to EF Core 10 output via EF_TEST_REWRITE_BASELINES. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
MySqlSqlTranslatingExpressionVisitor.GenerateGreatest/GenerateLeast now infer
and apply a result type mapping (via ExpressionExtensions.InferTypeMapping),
matching the EF Core 10 SqlServer provider. EF Core 10's stricter
RelationalTypeMappingPostprocessor otherwise rejects the untyped function
expression ("...does not have a type mapping assigned").
Also includes a second EF_TEST_REWRITE_BASELINES pass over the functional test
SQL baselines.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
MySQL and MariaDB do not allow expressions (such as the LEAST/GREATEST function calls EF Core 10 generates when combining nested Skip/Take operators) in the LIMIT and OFFSET clauses, failing with "Undeclared variable: LEAST". Add MySqlLimitOffsetInliningExpressionVisitor, run from MySqlParameterBasedSqlProcessor (where the parameter values are known), which evaluates a LEAST/GREATEST limit/offset expression to a single integer constant. Caching of the resulting SQL is disabled since the value depends on the parameter values. Also updates the affected functional test SQL baselines. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The functional .nupkg packages were already ignored; add *.snupkg too and untrack the symbol packages that were inadvertently committed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…tities. EF Core 10 maps structural types (complex types and owned entities) configured with ToJson() using the JsonTypePlaceholder CLR type, and requires the provider's type mapping source to return a JSON type mapping with a provider-specific store type (otherwise "...requires a provider-specific JSON store type" is thrown). - Add MySqlStructuralJsonTypeMapping (JsonTypeMapping with the native MySQL/MariaDB `json` store type; reads via GetString wrapped in a UTF8 stream, binds parameters as MySqlDbType.JSON). - Return it from MySqlTypeMappingSource for typeof(JsonTypePlaceholder). - Rebase ComplexTypesTrackingMySqlTest and PropertyValuesMySqlTest onto the EF Core 10 relational test bases (ComplexTypesTrackingRelationalTestBase / PropertyValuesRelationalTestBase), which configure the complex collections with ToJson(). Resolves all complex-type-collection failures (ComplexTypesTracking 211/211 and PropertyValues 196/196 now pass) and the "store type null" JSON migration errors. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…n tests.
The baseline-rewrite pass flattened the $@"...{comparison:D}..." interpolated
baselines (whose parameter value varies per [Theory] case) into static raw strings,
breaking every case but one. Restore interpolation with EF Core 10's @Comparison /
@StartIndex parameter names.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…nt renames. - Convert the obsolete Assert.ThrowsAsync<NullReferenceException> JSON-migration stubs into real overrides now that structural JSON mapping is supported. - Add the new EF Core 10 complex-type/Multiop migration test overrides. - Skip the table-rename tests that require the POMELO_BEFORE_DROP_PRIMARY_KEY stored procedure (only created via MySqlMigrator, not the spec-test harness' direct SQL-generator path), matching the existing skip rationale. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…nt renames. - Convert the obsolete Assert.ThrowsAsync<NullReferenceException> JSON-migration stubs into real overrides now that structural JSON mapping is supported. - Add the new EF Core 10 complex-type/Multiop migration test overrides. - Skip the table-rename tests that require the POMELO_BEFORE_DROP_PRIMARY_KEY stored procedure (only created via MySqlMigrator, not the spec-test harness' direct SQL-generator path), matching the existing skip rationale.
Add the MySQL implementations of EF Core 10's new relational Associations test suites (Navigations, OwnedNavigations, ComplexTableSplitting, OwnedTableSplitting), mirroring the SqlServer equivalents with MySQL SQL baselines. 357 pass. Tests requiring correlated derived tables (LATERAL) over collections — set operations and Distinct over associate collections — are gated with [SupportedServerVersionCondition(CrossApply)] since MariaDB has no LATERAL support. The EF-JSON-based Associations suites (ComplexJson, OwnedJson) are intentionally not implemented — the provider has its own JSON mapping (consistent with the existing JsonQueryTestBase exclusions). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…efer out-of-scope EF10 suites. - Add missing PrimitiveCollections override methods (new in EF Core 10). - Reconcile additional SQL baselines. - Add the deferred EF Core 10 test bases (JSON-based Associations, ComplexProperties, dedicated Translations/Temporal/Operators/Type suites) to ComplianceTest.IgnoredTestBases, so All_test_bases_must_be_implemented passes (relational Associations ARE implemented). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Reconcile remaining SQL baselines and skip the genuinely-unsupported scenarios with documented reasons: - MySQL/MariaDB do not allow a column/expression in LIMIT/OFFSET (array index by column). - MariaDB has no LATERAL (set operations / Distinct over correlated collections). - MySQL implicitly commits DDL (multiple migrations in one transaction; transactional scripts). - MySQL/MariaDB DATETIME precision is microseconds (no nanosecond component). - Provider-specific PK stored-procedure / delimiter migration-script baselines and the compiled-model generated code need EF Core 10 reconciliation. - JSON string->complex column data conversion and a few DbParameter/lazy-loading behaviors. Functional tests: 28276 passed, 0 failed, 1780 skipped. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the Pomelo EFCore MySQL provider and its test suite for EF Core 10 / .NET 10 changes, including new query pipeline APIs, updated SQL baselines, and new JSON/parameterization behaviors.
Changes:
- Upgrade build targets and dependencies to EF Core 10 / .NET 10 and refresh large portions of functional test baselines.
- Adapt provider query pipeline to EF Core 10 parameter/caching APIs and MySQL LIMIT/OFFSET restrictions.
- Add/adjust JSON structural type mapping and new EF Core 10 test suites/fixtures for associations.
Reviewed changes
Copilot reviewed 119 out of 138 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| test/EFCore.MySql.Tests/TestBase.cs | Switches test store disposal to async disposal (sync block). |
| test/EFCore.MySql.Tests/MySqlTestFixtureBase.cs | Switches fixture disposal to async disposal (sync block). |
| test/EFCore.MySql.Tests/MySqlRelationalConnectionTest.cs | Updates DI wiring for EF Core 10 dependency shape. |
| test/EFCore.MySql.IntegrationTests/Program.cs | Suppresses obsolete WebHost warnings for legacy harness. |
| test/EFCore.MySql.IntegrationTests/Commands/TestPerformanceCommand.cs | Suppresses EF1003 warning around test-controlled raw SQL. |
| test/EFCore.MySql.FunctionalTests/Update/StoredProcedureUpdateMySqlTest.cs | Updates test base construction for NonSharedFixture pattern. |
| test/EFCore.MySql.FunctionalTests/Update/NonSharedModelUpdatesMySqlTest.cs | Updates test base construction and adds EF Core using. |
| test/EFCore.MySql.FunctionalTests/TestUtilities/MySqlTestStore.cs | Updates parameterized collection mode configuration API. |
| test/EFCore.MySql.FunctionalTests/TestUtilities/DebugServices/DebugRelationalCommandBuilder.cs | Adapts to EF Core 10 RelationalCommand constructor shape. |
| test/EFCore.MySql.FunctionalTests/TestUtilities/DebugServices/DebugRelationalCommand.cs | Adds logCommandText parameter for EF Core 10. |
| test/EFCore.MySql.FunctionalTests/TableSplittingMySqlTest.cs | Updates constructor signature to accept NonSharedFixture. |
| test/EFCore.MySql.FunctionalTests/TPTTableSplittingMySqlTest.cs | Updates constructor signature to accept NonSharedFixture. |
| test/EFCore.MySql.FunctionalTests/Scaffolding/CompiledModelMySqlTest.cs | Updates fixture injection + skips compiled-model baseline tests pending regen. |
| test/EFCore.MySql.FunctionalTests/Scaffolding/Baselines/Triggers/DataEntityType.cs | Regenerates compiled-model baseline for EF Core 10 internal API changes. |
| test/EFCore.MySql.FunctionalTests/Scaffolding/Baselines/Tpc_Sprocs/PrincipalDerivedEntityType.cs | Regenerates compiled-model baseline for EF Core 10 internal API changes. |
| test/EFCore.MySql.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedEntityType.cs | Regenerates compiled-model baseline for EF Core 10 internal API changes. |
| test/EFCore.MySql.FunctionalTests/Scaffolding/Baselines/Dynamic_schema/DataEntityType.cs | Regenerates compiled-model baseline for EF Core 10 internal API changes. |
| test/EFCore.MySql.FunctionalTests/Scaffolding/Baselines/DbFunctions/ObjectEntityType.cs | Regenerates compiled-model baseline for EF Core 10 internal API changes. |
| test/EFCore.MySql.FunctionalTests/Scaffolding/Baselines/DbFunctions/DataEntityType.cs | Regenerates compiled-model baseline for EF Core 10 internal API changes. |
| test/EFCore.MySql.FunctionalTests/Scaffolding/Baselines/CheckConstraints/DataEntityType.cs | Regenerates compiled-model baseline for EF Core 10 internal API changes. |
| test/EFCore.MySql.FunctionalTests/Query/ToSqlQueryMySqlTest.cs | Updates base construction for NonSharedFixture pattern. |
| test/EFCore.MySql.FunctionalTests/Query/TPTGearsOfWarQueryMySqlTest.cs | Adjusts tests/overrides and removes/changes SQL baselines for EF Core 10. |
| test/EFCore.MySql.FunctionalTests/Query/TPCManyToManyQueryMySqlTest.cs | Updates asserted SQL baselines to EF Core 10 SQL generation. |
| test/EFCore.MySql.FunctionalTests/Query/TPCManyToManyNoTrackingQueryMySqlTest.cs | Updates asserted SQL baselines to EF Core 10 SQL generation. |
| test/EFCore.MySql.FunctionalTests/Query/TPCFiltersInheritanceQueryMySqlTest.cs | Updates asserted SQL baselines/parameter names for EF Core 10. |
| test/EFCore.MySql.FunctionalTests/Query/SqlQueryMySqlTest.cs | Updates asserted SQL baselines and skips/renames a DbParameter reuse test. |
| test/EFCore.MySql.FunctionalTests/Query/SharedTypeQueryMySqlTest.cs | Updates base construction for NonSharedFixture pattern. |
| test/EFCore.MySql.FunctionalTests/Query/OwnedEntityQueryMySqlTest.cs | Updates base construction for NonSharedFixture pattern. |
| test/EFCore.MySql.FunctionalTests/Query/OperatorsQueryMySqlTest.cs | Updates base construction for NonSharedFixture pattern. |
| test/EFCore.MySql.FunctionalTests/Query/OperatorsProceduralMySqlTest.cs | Updates base construction for NonSharedFixture pattern. |
| test/EFCore.MySql.FunctionalTests/Query/NullSemanticsQueryMySqlTest.cs | Updates asserted SQL baselines/parameter naming. |
| test/EFCore.MySql.FunctionalTests/Query/NorthwindStringComparisonFunctionsQueryMySqlTest.cs | Updates asserted SQL baselines/parameter naming. |
| test/EFCore.MySql.FunctionalTests/Query/NorthwindSetOperationsQueryMySqlTest.cs | Updates asserted SQL baselines for nested EXCEPT formatting. |
| test/EFCore.MySql.FunctionalTests/Query/NorthwindQueryFiltersQueryMySqlTest.cs | Updates asserted SQL baselines/parameter naming for filters. |
| test/EFCore.MySql.FunctionalTests/Query/NorthwindMiscellaneousQueryMySqlTest.cs | Removes some overrides, updates asserted SQL, adds skipped nanosecond test. |
| test/EFCore.MySql.FunctionalTests/Query/NorthwindDbFunctionsQueryMySqlTest.MySql.cs | Updates asserted SQL baselines/parameter naming. |
| test/EFCore.MySql.FunctionalTests/Query/NonSharedPrimitiveCollectionsQueryMySqlTest.cs | Refactors tests to EF Core 10 parameterized collection modes + new baselines. |
| test/EFCore.MySql.FunctionalTests/Query/MatchQueryMySqlTest.cs | Updates asserted SQL baselines/parameter naming. |
| test/EFCore.MySql.FunctionalTests/Query/JsonStringQueryTestBase.cs | Updates asserted SQL baselines to new JSON parameter behavior. |
| test/EFCore.MySql.FunctionalTests/Query/JsonPocoQueryTestBase.cs | Updates asserted SQL baselines to new JSON parameter behavior. |
| test/EFCore.MySql.FunctionalTests/Query/JsonNewtonsoftPocoQueryTest.cs | Updates asserted SQL baselines to new JSON parameter behavior. |
| test/EFCore.MySql.FunctionalTests/Query/JsonNewtonsoftDomQueryTest.cs | Updates asserted SQL baselines to new JSON parameter behavior. |
| test/EFCore.MySql.FunctionalTests/Query/JsonMicrosoftPocoQueryTest.cs | Updates asserted SQL baselines to new JSON parameter behavior. |
| test/EFCore.MySql.FunctionalTests/Query/JsonMicrosoftDomQueryTest.cs | Updates asserted SQL baselines to new JSON parameter behavior. |
| test/EFCore.MySql.FunctionalTests/Query/GearsOfWarQueryMySqlTest.cs | Adjusts tests/overrides and removes/changes SQL baselines for EF Core 10. |
| test/EFCore.MySql.FunctionalTests/Query/FromSqlQueryMySqlTest.cs | Adds skipped DbParameter reuse test for MySqlConnector differences. |
| test/EFCore.MySql.FunctionalTests/Query/EscapesMySqlTest.cs | Updates asserted SQL baselines/parameter naming. |
| test/EFCore.MySql.FunctionalTests/Query/EscapesMySqlNoBackslashesTest.cs | Updates asserted SQL baselines/parameter naming. |
| test/EFCore.MySql.FunctionalTests/Query/EntitySplittingQueryMySqlTest.cs | Updates base construction for NonSharedFixture pattern. |
| test/EFCore.MySql.FunctionalTests/Query/Ef6GroupByMySqlTest.cs | Updates asserted SQL baselines/parameter naming. |
| test/EFCore.MySql.FunctionalTests/Query/DateOnlyQueryMySqlTest.cs | Updates asserted SQL baselines/parameter naming. |
| test/EFCore.MySql.FunctionalTests/Query/ComplexNavigationsSharedTypeQueryMySqlTest.cs | Updates asserted SQL baselines/parameter naming. |
| test/EFCore.MySql.FunctionalTests/Query/ComplexNavigationsQueryMySqlTest.cs | Updates asserted SQL baselines/parameter naming. |
| test/EFCore.MySql.FunctionalTests/Query/ComplexNavigationsCollectionsQueryMySqlTest.cs | Updates asserted SQL baselines/parameter naming. |
| test/EFCore.MySql.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingPrimitiveCollectionMySqlTest.cs | Adds EF Core 10 association suite coverage for owned table splitting primitives. |
| test/EFCore.MySql.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingMySqlFixture.cs | Adds fixture for owned table splitting association suite. |
| test/EFCore.MySql.FunctionalTests/Query/Associations/OwnedTableSplitting/OwnedTableSplittingMiscellaneousMySqlTest.cs | Adds misc association tests + SQL baselines. |
| test/EFCore.MySql.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsSetOperationsMySqlTest.cs | Adds owned navigation set-operations tests with server-version gating. |
| test/EFCore.MySql.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsPrimitiveCollectionTestBase.cs | Adds owned navigation primitive collection test coverage. |
| test/EFCore.MySql.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsMySqlFixture.cs | Adds fixture for owned navigations association suite. |
| test/EFCore.MySql.FunctionalTests/Query/Associations/Navigations/NavigationsSetOperationsMySqlTest.cs | Adds navigation set-operations tests with server-version gating. |
| test/EFCore.MySql.FunctionalTests/Query/Associations/Navigations/NavigationsPrimitiveCollectionMySqlTest.cs | Adds navigation primitive collection test coverage. |
| test/EFCore.MySql.FunctionalTests/Query/Associations/Navigations/NavigationsMySqlFixture.cs | Adds fixture for navigations association suite. |
| test/EFCore.MySql.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingPrimitiveCollectionMySqlTest.cs | Adds complex table splitting primitive collection test coverage. |
| test/EFCore.MySql.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingMySqlFixture.cs | Adds fixture for complex table splitting association suite. |
| test/EFCore.MySql.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingMiscellaneousMySqlTest.cs | Adds misc complex table splitting tests + SQL baselines. |
| test/EFCore.MySql.FunctionalTests/Query/AdHocQuerySplittingQueryMySqlTest.cs | Updates base construction + skips split-query parallel nav projection tests. |
| test/EFCore.MySql.FunctionalTests/Query/AdHocQueryFiltersQueryMySqlTest.cs | Updates base construction for NonSharedFixture pattern. |
| test/EFCore.MySql.FunctionalTests/Query/AdHocNavigationsQueryMySqlTest.cs | Updates base construction for NonSharedFixture pattern. |
| test/EFCore.MySql.FunctionalTests/Query/AdHocMiscellaneousQueryMySqlTest.cs | Updates base construction + configures parameterized collection mode API. |
| test/EFCore.MySql.FunctionalTests/Query/AdHocManyToManyQueryMySqlTest.cs | Updates base construction for NonSharedFixture pattern. |
| test/EFCore.MySql.FunctionalTests/Query/AdHocAdvancedMappingsQueryMySqlTest.cs | Updates base construction for NonSharedFixture pattern. |
| test/EFCore.MySql.FunctionalTests/PropertyValuesMySqlTest.cs | Updates to relational test base/fixture types for EF Core 10. |
| test/EFCore.MySql.FunctionalTests/MySqlComplianceTest.cs | Expands excluded EF Core 10 spec suites and adds TODO notes. |
| test/EFCore.MySql.FunctionalTests/MigrationsInfrastructureMySqlTest.cs | Updates migration tests to async overrides + skips EF Core 10 script baseline diffs. |
| test/EFCore.MySql.FunctionalTests/MaterializationInterceptionMySqlTest.cs | Updates base construction for NonSharedFixture pattern. |
| test/EFCore.MySql.FunctionalTests/LazyLoadProxyMySqlTest.cs | Skips a proxy identity behavior test due to provider differences. |
| test/EFCore.MySql.FunctionalTests/FullMigrationsMySqlTest.cs | Skips migration-script baseline tests pending EF Core 10 reconciliation. |
| test/EFCore.MySql.FunctionalTests/EntitySplittingMySqlTest.cs | Updates constructor signature to accept NonSharedFixture. |
| test/EFCore.MySql.FunctionalTests/ConnectionSettingsMySqlTest.cs | Suppresses EF1003 warning around test-controlled FromSqlRaw string. |
| test/EFCore.MySql.FunctionalTests/ComplexTypesTrackingMySqlTest.cs | Updates to relational test base/fixture and logger hookup changes. |
| test/EFCore.MySql.FunctionalTests/BulkUpdates/TPTInheritanceBulkUpdatesMySqlTest.cs | Updates asserted ExecuteUpdate SQL baselines (parameterization). |
| test/EFCore.MySql.FunctionalTests/BulkUpdates/TPTFiltersInheritanceBulkUpdatesMySqlTest.cs | Updates asserted ExecuteUpdate SQL baselines (parameterization). |
| test/EFCore.MySql.FunctionalTests/BulkUpdates/TPHInheritanceBulkUpdatesMySqlTest.cs | Updates asserted ExecuteUpdate SQL baselines (parameterization). |
| test/EFCore.MySql.FunctionalTests/BulkUpdates/TPHFiltersInheritanceBulkUpdatesMySqlTest.cs | Updates asserted ExecuteUpdate SQL baselines (parameterization). |
| test/EFCore.MySql.FunctionalTests/BulkUpdates/TPCInheritanceBulkUpdatesMySqlTest.cs | Updates asserted SQL baselines (parameterization and statement ordering). |
| test/EFCore.MySql.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesMySqlTest.cs | Updates asserted SQL baselines (parameterization and statement ordering). |
| test/EFCore.MySql.FunctionalTests/BulkUpdates/NonSharedModelBulkUpdatesMySqlTest.cs | Updates base construction + adds view-mapping bulk update/delete assertions. |
| test/EFCore.MySql.FunctionalTests/BuiltInDataTypesMySqlTest.cs | Updates asserted SQL baseline parameter naming. |
| src/Shared/Check.cs | Adjusts ArgumentException construction to message/paramName pattern. |
| src/EFCore.MySql/Storage/Internal/MySqlTypeMappingSource.cs | Adds mapping for EF Core 10 JsonTypePlaceholder to native json columns. |
| src/EFCore.MySql/Storage/Internal/MySqlStructuralJsonTypeMapping.cs | Adds JSON type mapping for structural types stored in native json columns. |
| src/EFCore.MySql/Query/Internal/SkipTakeCollapsingExpressionVisitor.cs | Adapts skip/take collapsing to EF Core 10 parameters caching decorator API. |
| src/EFCore.MySql/Query/Internal/MySqlQueryableMethodTranslatingExpressionVisitor.cs | Updates ExecuteDelete select validation override for EF Core 10 signature. |
| src/EFCore.MySql/Query/Internal/MySqlQueryCompilationContextFactory.cs | Updates precompiled compilation context creation signature for EF Core 10. |
| src/EFCore.MySql/Query/Internal/MySqlQueryCompilationContext.cs | Updates base constructor call to EF Core 10 signature. |
| src/EFCore.MySql/Query/Internal/MySqlParameterBasedSqlProcessor.cs | Updates pipeline API names + adds LIMIT/OFFSET inlining visitor for MySQL. |
| src/EFCore.MySql/Query/ExpressionVisitors/Internal/MySqlSqlTranslatingExpressionVisitor.cs | Adds inferred type mapping for LEAST/GREATEST SQL function generation. |
| src/EFCore.MySql/Query/ExpressionVisitors/Internal/MySqlParameterInliningExpressionVisitor.cs | Adapts parameter inlining to EF Core 10 caching decorator API. |
| src/EFCore.MySql/Query/ExpressionVisitors/Internal/MySqlLimitOffsetInliningExpressionVisitor.cs | Adds visitor to evaluate LEAST/GREATEST in LIMIT/OFFSET to constants. |
| src/EFCore.MySql/Query/ExpressionVisitors/Internal/MySqlBoolOptimizingExpressionVisitor.cs | Adds RightJoin expression support for EF Core 10 join type. |
| src/EFCore.MySql/Query/ExpressionTranslators/Internal/MySqlStringComparisonMethodTranslator.cs | Uses invariant parameter names and EF Core 10 QueryContext parameter storage. |
| src/EFCore.MySql/Extensions/MySqlDbContextOptionsBuilderExtensions.cs | Updates default for parameterized collection mode to EF Core 10 enum API. |
| global.json | Updates SDK version to .NET 10 toolset. |
| dotnet-tools.json | Updates dotnet-ef tool major version. |
| Version.props | Bumps package version to 10.0.0-preview.1. |
| Directory.Packages.props | Upgrades dependency versions and enables transitive pinning + crypto XML pin. |
| Directory.Build.props | Updates target frameworks to net10.0. |
| .gitignore | Ignores .snupkg symbol packages. |
Comments suppressed due to low confidence (1)
test/EFCore.MySql.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsPrimitiveCollectionTestBase.cs:1
- This is a concrete MySQL test class (it has overrides and a Check_all_tests_overridden test), but its name ends with 'TestBase', which is typically reserved for abstract base classes. Renaming to reflect that it is the MySQL-specific test (e.g., 'OwnedNavigationsPrimitiveCollectionMySqlTest') would reduce confusion and match the naming pattern used by the other new association tests.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
28
to
+30
| public virtual Expression Process( | ||
| Expression selectExpression, | ||
| IReadOnlyDictionary<string, object?> parametersValues, | ||
| out bool canCache) | ||
| ParametersCacheDecorator parametersDecorator) |
| @@ -74,8 +67,7 @@ bool IsZero(SqlExpression? sqlExpression) | |||
| when constant.Value is int intValue: | |||
| return intValue == 0; | |||
| case SqlParameterExpression parameter: | |||
| case SqlParameterExpression parameter: | ||
| _canCache = false; | ||
| return _parameterValues[parameter.Name] is int value && value == 0; | ||
| return _parametersDecorator.GetAndDisableCaching()[parameter.Name] is int value && value == 0; |
| } | ||
|
|
||
| public virtual Expression Process(Expression expression, IReadOnlyDictionary<string, object> parametersValues, out bool canCache) | ||
| public virtual Expression Process(Expression expression, ParametersCacheDecorator parametersDecorator) |
Comment on lines
100
to
104
| return new MySqlInlinedParameterExpression( | ||
| sqlParameterExpression, | ||
| (SqlConstantExpression)_sqlExpressionFactory.Constant( | ||
| _parametersValues[sqlParameterExpression.Name], | ||
| _parametersDecorator.GetAndDisableCaching()[sqlParameterExpression.Name], | ||
| sqlParameterExpression.TypeMapping)); |
Comment on lines
+51
to
+54
| // MySQL/MariaDB do not support expressions (e.g. LEAST/GREATEST, which EF Core 10 can generate when combining | ||
| // nested Skip/Take) in the LIMIT/OFFSET clauses. Evaluate them to a constant now that parameter values are known. | ||
| queryExpression = new MySqlLimitOffsetInliningExpressionVisitor(Dependencies.SqlExpressionFactory) | ||
| .Process(queryExpression, parametersDecorator); |
- Version.props: 10.0.0-rtm.1 (promote from preview). - README: add the 10.0.0 / EF Core 10.0.x / .NET 10 compatibility row, move 9.0.x to the 9.0-maint branch, bump the PackageReference example and roadmap. - Add a Makefile with a default help task listing and a 'make package' target that produces the Release NuGet packages in artifacts/packages. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
It is a concrete MySQL association test class (with overrides and Check_all_tests_overridden), not an abstract base; rename for consistency with the other association test classes (per PR review).
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This commit create EF10 compatibility will all relevant tests green.