0
GeovaniMartinez created
After upgrading just above everything works as expected except for when we visit Administration -> Users - The UI shows "An internal error occurred during your request and the logs show the following error
ERROR 2024-03-23 12:59:55,160 [orker] oft.EntityFrameworkCore.Database.Command - Failed executing DbCommand (100ms) [Parameters=[@__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__CurrentTenantId_1='?' (DbType = Int32), @__userIds_0='?' (Size = 4000)], CommandType='Text', CommandTimeout='30']
SELECT [a].[Id], [a].[CreationTime], [a].[CreatorUserId], [a].[RoleId], [a].[TenantId], [a].[UserId]
FROM [AbpUserRoles] AS [a]
WHERE (@__ef_filter__p_0 = CAST(1 AS bit) OR [a].[TenantId] = @__ef_filter__CurrentTenantId_1) AND [a].[UserId] IN (
SELECT [u].[value]
FROM OPENJSON(@__userIds_0) WITH ([value] bigint '$') AS [u]
)
ERROR 2024-03-23 12:59:55,174 [orker] Microsoft.EntityFrameworkCore.Query - An exception occurred while iterating over the results of a query for context type 'solution.EntityFrameworkCore.solutionDbContext'.
Microsoft.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near the keyword 'WITH'.
Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.
1 Answer(s)
-
0
Hi,
Please take a look at https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-8.0/breaking-changes#sqlserver-contains-compatibility.
This section explains the solution https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-8.0/breaking-changes#mitigations