Open Closed

Failed task execution: "Database synchronization | Migrating database" #8656


User avatar
0
865799568@qq.com created

ABP Stuio version: V0.9.21
Create a New solution successful
but

dotnet run --migrate-database --disable-redis Fail!!!

ERROR DETAILS: "Database migration failed! Error details: [17:07:27 FTL] AbpSolution2 terminated unexpectedly!
System.InvalidOperationException: The LINQ expression '@__organizationUnitIds_0' could not be translated. Additional information: Primitive collections support has not been enabled. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to 'AsEnumerable', 'AsAsyncEnumerable', 'ToList', or 'ToListAsync'. See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.

database:mysql

error.png

please help me
thanks


1 Answer(s)
  • User Avatar
    0
    865799568@qq.com created

    Configure<AbpDbContextOptions>(options =>
    {
    /* The main point to change your DBMS.
    * See also HayoonKoreaDbContextFactory for EF Core tooling. */
    options.UseMySQL(builder =>
    {
    builder.TranslateParameterizedCollectionsToConstants();
    });
    });
    https://github.com/abpframework/abp/issues/21879
    Although this bug has been resolved, ABP Studio still has this issue. Could you please let me know when it is expected to be fixed?

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on April 11, 2025, 10:10