Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
00a312a
Upgrade to EF Core 10.
ffquintella Jun 3, 2026
4d78ea1
Assign type mapping to GREATEST/LEAST and reconcile more SQL baselines.
ffquintella Jun 3, 2026
1972f5a
Inline LEAST/GREATEST in LIMIT/OFFSET for MySQL/MariaDB.
ffquintella Jun 3, 2026
03045a9
Stop tracking symbol packages (*.snupkg).
ffquintella Jun 3, 2026
bb9affd
Support EF Core 10 structural JSON mapping for complex types/owned en…
ffquintella Jun 3, 2026
7596695
Restore interpolated SQL baselines for parameterized string-compariso…
ffquintella Jun 8, 2026
12420ca
Fix EF Core 10 JSON migration test overrides and skip PK-proc-depende…
ffquintella Jun 8, 2026
21c8f06
Fix EF Core 10 JSON migration test overrides and skip PK-proc-depende…
ffquintella Jun 8, 2026
33e336d
Merge remote-tracking branch 'origin/Upgrade-to-Ef10' into Upgrade-to…
ffquintella Jun 8, 2026
890f95e
Implement EF Core 10 relational Associations test suites for MySQL.
ffquintella Jun 8, 2026
69186f6
Add PrimitiveCollections EF10 test overrides + reconcile baselines; d…
ffquintella Jun 8, 2026
3f80272
Reach green on the EF Core 10 functional test suite.
ffquintella Jun 8, 2026
6c1ce8f
Set version to 10.0.0 (rtm), update README for EF Core 10, add Makefile.
ffquintella Jun 8, 2026
09412bd
Rename OwnedNavigationsPrimitiveCollectionTestBase to ...MySqlTest.
ffquintella Jun 8, 2026
b178d25
Reconcile PrimitiveCollections and JSON SQL baselines to pass on both…
ffquintella Jun 8, 2026
f48367d
Bump patch version to 10.0.1.
ffquintella Jun 8, 2026
f7ca36a
Bump version to 10.0.0-rtm.2 (revert 10.0.1 patch bump).
ffquintella Jun 8, 2026
3e10aee
Address PR #2042 review and reconcile MariaDB SQL baselines.
ffquintella Jun 8, 2026
4fe977f
Make DateOnly query test baselines date-independent.
ffquintella Jun 9, 2026
76a84fb
Reconcile MySQL-only test baselines for EF Core 10.
ffquintella Jun 9, 2026
643ebe5
Bump version to 10.0.0-rtm.3.
ffquintella Jun 9, 2026
fb2340d
Skip MariaDB error 1020 (ER_CHECKREAD) on table-splitting bulk updates
ffquintella Jun 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ PublishScripts/

# NuGet Packages
*.nupkg
*.snupkg
.packages/
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
Expand Down
8 changes: 4 additions & 4 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
</PropertyGroup>

<PropertyGroup>
<PomeloTargetFramework>net8.0</PomeloTargetFramework>
<PomeloTestTargetFramework>net9.0</PomeloTestTargetFramework>
<EfCoreTargetFramework>net8.0</EfCoreTargetFramework>
<EfCoreTestTargetFramework>net9.0</EfCoreTestTargetFramework>
<PomeloTargetFramework>net10.0</PomeloTargetFramework>
<PomeloTestTargetFramework>net10.0</PomeloTestTargetFramework>
<EfCoreTargetFramework>net10.0</EfCoreTargetFramework>
<EfCoreTestTargetFramework>net10.0</EfCoreTestTargetFramework>
<MySqlConnectorTargetFramework>net8.0</MySqlConnectorTargetFramework>
<MySqlConnectorDependencyInjectionTargetFramework>net8.0</MySqlConnectorDependencyInjectionTargetFramework>
</PropertyGroup>
Expand Down
58 changes: 31 additions & 27 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
<!-- We shoud try: [9.0.0,9.1.0-0)
`-0` is the smallest possible prerelease version according to SemVer2.
-->
<EFCoreVersion>[9.0.0,9.0.999]</EFCoreVersion>
<EFCoreVersion>[10.0.0,10.0.999]</EFCoreVersion>
<!-- Pin transitive dependencies (e.g. to override versions with known vulnerabilities). -->
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
</PropertyGroup>

<ItemGroup Label="Dependencies">
Expand All @@ -15,46 +17,48 @@
<PackageVersion Include="MySqlConnector" Version="2.4.0" />
<PackageVersion Include="MySqlConnector.DependencyInjection" Version="2.4.0" />

<PackageVersion Include="NetTopologySuite" Version="2.5.0" />
<PackageVersion Include="NetTopologySuite" Version="2.6.0" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />

<PackageVersion Include="Castle.Core" Version="5.1.1" />
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="9.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="9.0.0" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.0" />
<PackageVersion Include="Castle.Core" Version="5.2.1" />
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="10.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="10.0.0" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="10.0.0" />
<!--<PackageVersion Include="Microsoft.Bcl.HashCode" Version="1.1.1" />-->
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.FileExtensions" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="9.0.0" /> <!-- CHECK: used? -->
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyModel" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="10.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="10.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.FileExtensions" Version="10.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="10.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="10.0.0" /> <!-- CHECK: used? -->
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="10.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyModel" Version="10.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="10.0.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageVersion Include="Moq" Version="4.20.72" />
<PackageVersion Include="System.Collections.Immutable" Version="9.0.0" />
<PackageVersion Include="System.Collections.Immutable" Version="10.0.0" />
<PackageVersion Include="System.ComponentModel.TypeConverter" Version="4.3.0" />
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="9.0.0" />
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="10.0.0" />
<!-- Transitive dependency pinned to a non-vulnerable version (see CentralPackageTransitivePinningEnabled). -->
<PackageVersion Include="System.Security.Cryptography.Xml" Version="10.0.8" />
<PackageVersion Include="GitHubActionsTestLogger" Version="2.4.1" />
<PackageVersion Include="Xunit.SkippableFact" Version="1.4.13" />

<!-- Keep at the same level that the EF Core projects use. -->
<PackageVersion Include="xunit.assert" Version="2.9.2" />
<PackageVersion Include="xunit.core" Version="2.9.2" />
<PackageVersion Include="xunit.runner.console" Version="2.9.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
<PackageVersion Include="xunit.assert" Version="2.9.3" />
<PackageVersion Include="xunit.core" Version="2.9.3" />
<PackageVersion Include="xunit.runner.console" Version="2.9.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.3" />
<PackageVersion Include="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.59" />
<PackageVersion Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="All" />

<!-- Needed when using EFCore.Design assembly from local EF Core repository. -->
<PackageVersion Include="Microsoft.CodeAnalysis" Version="4.10.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.10.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Features" Version="4.10.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.10.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic.Features" Version="4.10.0" />
<PackageVersion Include="System.Text.Json" Version="9.0.0" />
<PackageVersion Include="Microsoft.CodeAnalysis" Version="4.14.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.14.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Features" Version="4.14.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.14.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic.Features" Version="4.14.0" />
<PackageVersion Include="System.Text.Json" Version="10.0.0" />
</ItemGroup>
</Project>
47 changes: 47 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Pomelo.EntityFrameworkCore.MySql

SOLUTION := Pomelo.EFCore.MySql.sln
CONFIGURATION ?= Debug
PACKAGE_OUTPUT := artifacts/packages
SRC_PROJECTS := \
src/EFCore.MySql/EFCore.MySql.csproj \
src/EFCore.MySql.NTS/EFCore.MySql.NTS.csproj \
src/EFCore.MySql.Json.Microsoft/EFCore.MySql.Json.Microsoft.csproj \
src/EFCore.MySql.Json.Newtonsoft/EFCore.MySql.Json.Newtonsoft.csproj

.DEFAULT_GOAL := help

.PHONY: help restore build rebuild test functional-tests package clean

help: ## List the available tasks (default)
@echo "Pomelo.EntityFrameworkCore.MySql -- available make tasks:"
@echo ""
@grep -hE '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-16s\033[0m %s\n", $$1, $$2}'
@echo ""
@echo "Override the build configuration with CONFIGURATION=Release (default: Debug)."

restore: ## Restore NuGet dependencies for the solution
dotnet restore $(SOLUTION)

build: ## Build the solution (CONFIGURATION=Debug|Release)
dotnet build $(SOLUTION) -c $(CONFIGURATION)

rebuild: clean build ## Clean, then build the solution

test: ## Run the unit tests (no database required)
dotnet test test/EFCore.MySql.Tests/EFCore.MySql.Tests.csproj -c $(CONFIGURATION)

functional-tests: ## Run the functional tests (requires a configured config.json + database)
dotnet test test/EFCore.MySql.FunctionalTests/EFCore.MySql.FunctionalTests.csproj -c $(CONFIGURATION)

package: ## Create the release NuGet packages in artifacts/packages
rm -rf $(PACKAGE_OUTPUT)
$(foreach proj,$(SRC_PROJECTS),dotnet pack $(proj) -c Release -o $(PACKAGE_OUTPUT) &&) true
@echo ""
@echo "Release packages created in $(PACKAGE_OUTPUT):"
@ls -1 $(PACKAGE_OUTPUT)/*.nupkg

clean: ## Remove build outputs and generated packages
dotnet clean $(SOLUTION) -c $(CONFIGURATION) || true
rm -rf $(PACKAGE_OUTPUT)
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ The following versions of MySqlConnector, EF Core, .NET (Core), .NET Standard an

Release | Branch | MySqlConnector | EF Core | .NET (Core) | .NET Standard | .NET Framework
--- |--------------------------------------------------------------------------------------------------|--------------------|:-------:|:-----------:| :---: | :---:
[9.0.0](https://www.nuget.org/packages/Pomelo.EntityFrameworkCore.MySql/9.0.0) | [main](https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/tree/main) | >= 2.4.0 | 9.0.x | 8.0+ | - | -
[10.0.0](https://www.nuget.org/packages/Pomelo.EntityFrameworkCore.MySql/10.0.0) | [main](https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/tree/main) | >= 2.4.0 | 10.0.x | 10.0+ | - | -
[9.0.0](https://www.nuget.org/packages/Pomelo.EntityFrameworkCore.MySql/9.0.0) | [9.0-maint](https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/tree/9.0-maint) | >= 2.4.0 | 9.0.x | 8.0+ | - | -
[8.0.3](https://www.nuget.org/packages/Pomelo.EntityFrameworkCore.MySql/8.0.3) | [8.0-maint](https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/tree/8.0-maint) | >= 2.3.5 | 8.0.x | 8.0+ | - | -
[7.0.0](https://www.nuget.org/packages/Pomelo.EntityFrameworkCore.MySql/7.0.0) | [7.0-maint](https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/tree/7.0-maint) | >= 2.2.5 | 7.0.x | 6.0+ | - | -
[6.0.3](https://www.nuget.org/packages/Pomelo.EntityFrameworkCore.MySql/6.0.3) | [6.0-maint](https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/tree/6.0-maint) | >= 2.1.2 | 6.0.x | 6.0+ | - | -
Expand Down Expand Up @@ -49,6 +50,7 @@ Currently tested versions are:

Milestone | Status | Release Date
----------|----------|-------------
10.0.0 | In Progress | -
9.0.0 | Released | 2025-08-17
8.0.3 | Released | 2025-03-02
7.0.0 | Released | 2023-01-16
Expand Down Expand Up @@ -95,7 +97,7 @@ All `.pdb` files use Source Link.
Ensure that your `.csproj` file contains the following reference:

```xml
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="9.0.0" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="10.0.0" />
```

### 2. Services Configuration
Expand Down
6 changes: 3 additions & 3 deletions Version.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
We also used alpha/beta/silver release types in the past, but they mix poorly with the ones above when orderend according to SemVer2
rules.
-->
<VersionPrefix>9.0.1</VersionPrefix>
<PreReleaseVersionLabel>servicing</PreReleaseVersionLabel>
<PreReleaseVersionIteration>1</PreReleaseVersionIteration>
<VersionPrefix>10.0.0</VersionPrefix>
<PreReleaseVersionLabel>rtm</PreReleaseVersionLabel>
<PreReleaseVersionIteration>3</PreReleaseVersionIteration>

<!--
A string like `.efcore.9.0.0` or `.efcore.9.0.0.preview.1` can be added to the version suffix, to indicate that this release targets
Expand Down
2 changes: 1 addition & 1 deletion dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "9.0.0",
"version": "10.0.0",
"commands": [
"dotnet-ef"
]
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "9.0.100",
"version": "10.0.300",
"allowPrerelease": false,
"rollForward": "latestFeature"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Pomelo.EntityFrameworkCore.MySql.Infrastructure;
using Pomelo.EntityFrameworkCore.MySql.Infrastructure.Internal;
using JetBrains.Annotations;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Diagnostics;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Utilities;
Expand Down Expand Up @@ -62,7 +63,7 @@ public static DbContextOptionsBuilder UseMySql(
ConfigureWarnings(optionsBuilder);

var mySqlDbContextOptionsBuilder = new MySqlDbContextOptionsBuilder(optionsBuilder)
.TranslateParameterizedCollectionsToConstants();
.UseParameterizedCollectionMode(ParameterTranslationMode.Constant);

mySqlOptionsAction?.Invoke(mySqlDbContextOptionsBuilder);

Expand Down Expand Up @@ -108,7 +109,7 @@ public static DbContextOptionsBuilder UseMySql(
ConfigureWarnings(optionsBuilder);

var mySqlDbContextOptionsBuilder = new MySqlDbContextOptionsBuilder(optionsBuilder)
.TranslateParameterizedCollectionsToConstants();
.UseParameterizedCollectionMode(ParameterTranslationMode.Constant);

mySqlOptionsAction?.Invoke(mySqlDbContextOptionsBuilder);

Expand Down Expand Up @@ -158,7 +159,7 @@ public static DbContextOptionsBuilder UseMySql(
ConfigureWarnings(optionsBuilder);

var mySqlDbContextOptionsBuilder = new MySqlDbContextOptionsBuilder(optionsBuilder)
.TranslateParameterizedCollectionsToConstants();
.UseParameterizedCollectionMode(ParameterTranslationMode.Constant);

mySqlOptionsAction?.Invoke(mySqlDbContextOptionsBuilder);

Expand Down Expand Up @@ -205,7 +206,7 @@ public static DbContextOptionsBuilder UseMySql(
ConfigureWarnings(optionsBuilder);

var mySqlDbContextOptionsBuilder = new MySqlDbContextOptionsBuilder(optionsBuilder)
.TranslateParameterizedCollectionsToConstants();
.UseParameterizedCollectionMode(ParameterTranslationMode.Constant);

mySqlOptionsAction?.Invoke(mySqlDbContextOptionsBuilder);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -524,22 +524,21 @@ protected virtual SqlExpression GetLikeExpressionUsingParameter(
RelationalTypeMapping stringTypeMapping,
StartsEndsWithContains methodType)
{
if (pattern is SqlParameterExpression patternParameter &&
patternParameter.Name.StartsWith(QueryCompilationContext.QueryParameterPrefix, StringComparison.Ordinal))
if (pattern is SqlParameterExpression patternParameter)
{
// The pattern is a parameter, register a runtime parameter that will contain the rewritten LIKE pattern, where
// all special characters have been escaped.
var lambda = Expression.Lambda(
Expression.Call(
_escapeLikePatternParameterMethod,
QueryCompilationContext.QueryContextParameter,
Expression.Constant(patternParameter.Name),
Expression.Constant(patternParameter.InvariantName),
Expression.Constant(methodType)),
QueryCompilationContext.QueryContextParameter);

var escapedPatternParameter =
queryCompilationContext.RegisterRuntimeParameter(
$"{patternParameter.Name}_{methodType.ToString().ToLower(CultureInfo.InvariantCulture)}",
$"{patternParameter.InvariantName}_{methodType.ToString().ToLower(CultureInfo.InvariantCulture)}",
lambda);

return _sqlExpressionFactory.Like(
Expand Down Expand Up @@ -718,7 +717,7 @@ private static string ConstructLikePatternParameter(
QueryContext queryContext,
string baseParameterName,
StartsEndsWithContains methodType)
=> queryContext.ParameterValues[baseParameterName] switch
=> queryContext.Parameters[baseParameterName] switch
{
null => null,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,20 @@ protected override Expression VisitLeftJoin(LeftJoinExpression leftJoinExpressio
return leftJoinExpression.Update(table, joinPredicate);
}

protected override Expression VisitRightJoin(RightJoinExpression rightJoinExpression)
{
Check.NotNull(rightJoinExpression, nameof(rightJoinExpression));

var parentOptimize = _optimize;
_optimize = false;
var table = (TableExpressionBase)Visit(rightJoinExpression.Table);
_optimize = true;
var joinPredicate = (SqlExpression)Visit(rightJoinExpression.JoinPredicate);
_optimize = parentOptimize;

return rightJoinExpression.Update(table, joinPredicate);
}

protected override Expression VisitRowValue(RowValueExpression rowValueExpression)
{
var parentOptimize = _optimize;
Expand Down
Loading
Loading