-
-
Notifications
You must be signed in to change notification settings - Fork 597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.NET 9 - BulkInsertOrUpdateOrDeleteAsync - Cannot get _selectExpression #1620
Comments
It is not yet fully supported, waiting for Pomelo nuget dependency to release v9. |
We are using SQLite (in tests) and experience this error. It's still dependent on Pomelo MySql? |
Not sure, will check it out in a few days. |
Just an FYI on what I have found, when using against the "Microsoft.EntityFrameworkCore.SqlServer" Provider. I think its failing in IQueryableExtensions.ToParametrizedSql method, due to one or more of the "enumerator" private fields no longer existing in net 9.0.. When running under net8.0, the private field "_relationalCommandCache" always seems to be populated, i.e
NOTE: When relationalCommandCache is null, the following fallback code does not work for either versions, |
After upgrading to.NET 9, The following error comes up with BulkInsertOrUpdateOrDeleteAsync
Message
Cannot get _selectExpression
StackTrace
at EFCore.BulkExtensions.IQueryableExtensions.ToParametrizedSql(IQueryable query) at EFCore.BulkExtensions.BatchUtil.GetBatchSql(IQueryable query, DbContext context, Boolean isUpdate) at EFCore.BulkExtensions.SqlAdapters.SqlQueryBuilder.MergeTable[T](DbContext context, TableInfo tableInfo, OperationType operationType, IEnumerable
1 entityPropertyWithDefaultValue)at EFCore.BulkExtensions.SqlAdapters.SqlServer.SqlServerAdapter.d__9
1.MoveNext() at EFCore.BulkExtensions.SqlAdapters.SqlServer.SqlServerAdapter.<MergeAsync>d__9
1.MoveNext()at EFCore.BulkExtensions.SqlAdapters.SqlServer.SqlServerAdapter.d__8
1.MoveNext() at EFCore.BulkExtensions.SqlBulkOperation.<MergeAsync>d__5
1.MoveNext()at EFCore.BulkExtensions.DbContextBulkTransaction.d__1
1.MoveNext()
The text was updated successfully, but these errors were encountered: