abpframework / abpframework/abp

`MySQL` SQL tree does not have a type mapping assigned.

Open
#24,213 28 comments 0 reactions 1 assignee View on GitHub

@maliming is already working on this.

Since Dec 30, 2025.

Dominant language
C#
Stars
14.4k
Forks
3.7k
Avg merge
15h 32m
Merged PRs (30d)
106

Description

Is there an existing issue for this?
  • I have searched the existing issues
Description

Our project update from 9.3.6 to 10.0.0,Running the 'DbMigrator' project prompts an error,
private async Task SeedDataAsync(Tenant? tenant = null)
{
Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed...");

 await _dataSeeder.SeedAsync(new DataSeedContext(tenant?.Id)
     .WithProperty(IdentityDataSeedContributor.AdminEmailPropertyName,
         BookStoreConsts.AdminEmailDefaultValue)
     .WithProperty(IdentityDataSeedContributor.AdminPasswordPropertyName,
         BookStoreConsts.AdminPasswordDefaultValue)
 );

}
The erro detail:
System.InvalidOperationException
HResult=0x80131509
Message=Expression '@names' in the SQL tree does not have a type mapping assigned.
Source=Microsoft.EntityFrameworkCore.Relational
StackTrace:
在 Microsoft.EntityFrameworkCore.Query.RelationalTypeMappingPostprocessor.VisitExtension(Expression expression)
在 Microsoft.EntityFrameworkCore.Query.SqlExpressions.InExpression.VisitChildren(ExpressionVisitor visitor)
在 Microsoft.EntityFrameworkCore.Query.RelationalTypeMappingPostprocessor.VisitExtension(Expression expression)
在 Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlBinaryExpression.VisitChildren(ExpressionVisitor visitor)
在 Microsoft.EntityFrameworkCore.Query.RelationalTypeMappingPostprocessor.VisitExtension(Expression expression)
在 Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlBinaryExpression.VisitChildren(ExpressionVisitor visitor)
在 Microsoft.EntityFrameworkCore.Query.RelationalTypeMappingPostprocessor.VisitExtension(Expression expression)
在 Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlBinaryExpression.VisitChildren(ExpressionVisitor visitor)
在 Microsoft.EntityFrameworkCore.Query.RelationalTypeMappingPostprocessor.VisitExtension(Expression expression)
在 Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression.VisitChildren(ExpressionVisitor visitor)
在 Microsoft.EntityFrameworkCore.Query.RelationalTypeMappingPostprocessor.VisitExtension(Expression expression)
在 Microsoft.EntityFrameworkCore.Query.RelationalTypeMappingPostprocessor.VisitExtension(Expression expression)
在 Microsoft.EntityFrameworkCore.Query.RelationalTypeMappingPostprocessor.Process(Expression expression)
在 Microsoft.EntityFrameworkCore.Query.RelationalQueryTranslationPostprocessor.ProcessTypeMappings(Expression expression)
在 Microsoft.EntityFrameworkCore.Query.RelationalQueryTranslationPostprocessor.Process(Expression query)
在 MySql.EntityFrameworkCore.Query.Internal.MySQLQueryTranslationPostprocessor.Process(Expression query)
在 Microsoft.EntityFrameworkCore.Query.QueryCompilationContext.CreateQueryExecutorExpression[TResult](Expression query)
在 Microsoft.EntityFrameworkCore.Query.QueryCompilationContext.CreateQueryExecutor[TResult](Expression query)
在 Microsoft.EntityFrameworkCore.Storage.Database.CompileQuery[TResult](Expression query, Boolean async)
在 Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.CompileQueryCore[TResult](IDatabase database, Expression query, IModel model, Boolean async)
在 Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass11_01.<ExecuteCore>b__0() 在 Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQuery[TResult](Object cacheKey, Func1 compiler)
在 Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.ExecuteCore[TResult](Expression query, Boolean async, CancellationToken cancellationToken)
在 Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.ExecuteAsync[TResult](Expression query, CancellationToken cancellationToken)
在 Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.ExecuteAsync[TResult](Expression expression, CancellationToken cancellationToken)
在 Volo.Abp.EntityFrameworkCore.AbpEntityQueryProvider.ExecuteAsync[TResult](Expression expression, CancellationToken cancellationToken)
在 Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable1.GetAsyncEnumerator(CancellationToken cancellationToken) 在 System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable1.GetAsyncEnumerator()
在 Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.d__671.MoveNext() 在 Volo.Abp.PermissionManagement.EntityFrameworkCore.EfCorePermissionGrantRepository.<GetListAsync>d__3.MoveNext() 在 Castle.DynamicProxy.AsyncInterceptorBase.<ProceedAsynchronous>d__141.MoveNext()
在 Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.<ProceedAsync>d__7.MoveNext() 在 Volo.Abp.Uow.UnitOfWorkInterceptor.<InterceptAsync>d__2.MoveNext() 在 Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.d__31.MoveNext() 在 Volo.Abp.PermissionManagement.PermissionDataSeeder.<SeedAsync>d__10.MoveNext() 在 Volo.Abp.PermissionManagement.PermissionDataSeedContributor.<SeedAsync>d__10.MoveNext() 在 Volo.Abp.Data.DataSeeder.<SeedAsync>d__7.MoveNext() 在 Castle.DynamicProxy.AsyncInterceptorBase.<ProceedAsynchronous>d__13.MoveNext() 在 Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.<ProceedAsync>d__7.MoveNext() 在 Volo.Abp.Uow.UnitOfWorkInterceptor.<InterceptAsync>d__2.MoveNext() 在 Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.d__2.MoveNext()
在 Acme.BookStore.Data.BookStoreDbMigrationService.d__11.MoveNext() 在 E:\Projects\XTime\FreamWork\test5\Acme.BookStore\src\Acme.BookStore.Domain\Data\BookStoreDbMigrationService.cs 中: 第 108 行
在 Acme.BookStore.Data.BookStoreDbMigrationService.d__9.MoveNext() 在 E:\Projects\XTime\FreamWork\test5\Acme.BookStore\src\Acme.BookStore.Domain\Data\BookStoreDbMigrationService.cs 中: 第 54 行
在 Acme.BookStore.DbMigrator.DbMigratorHostedService.d__3.MoveNext() 在 E:\Projects\XTime\FreamWork\test5\Acme.BookStore\src\Acme.BookStore.DbMigrator\DbMigratorHostedService.cs 中: 第 36 行
在 Microsoft.Extensions.Hosting.Internal.Host.<b__14_1>d.MoveNext()
在 Microsoft.Extensions.Hosting.Internal.Host.d__17`1.MoveNext()

Reproduction Steps

No response

Expected behavior

No response

Actual behavior

No response

Regression?

No response

Known Workarounds

No response

Version

10.0.0

User Interface

MVC

Database Provider

EF Core (Default)

Tiered or separate authentication server

None (Default)

Operation System

Windows (Default)

Other information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.