-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
DbUpdateException.Entries is empty when parameter doesn't have valid geography data #22181
Comments
@brunokc Switching off batching in .UseSqlServer(_connectionString, b => b.MaxBatchSize(1)); |
@brunokc Also, this may be fixed in the EF Core 5.0 previews or NTS 2.1. Can you try with those and see if the issue is still reproducable? |
Empty entries issue is tracked by #7829 |
Thank you, @ajcvickers. As it turns out, I'm already using NTS 2.1. I'll have to try EF Core 5.0 preview at some point. As for the use of Having a fix for issue #7829 would be great so people won't have to significantly slow down their code in order to debug such issues. I'll see if I can give EF Core 5.0 preview a try to see if that's fixed there. Thanks again! |
@brunokc The point was to make each INSERT happen in it's own round-trip so you can see from the logs which values are causing the issue. Make sure to turn on |
Ah, thank you, @ajcvickers. It makes sense now. I wasn't aware of the |
Fixed in bff57f9 |
I'm ingesting data from an XML file into a SQL Server database using EF Core 3.1. I'm using the NetTopologySuite package to add support for geography/geometry types. While ingesting 19,000+ rows, SaveChangesAsync() throws a DbUpdateException exception, which wraps a SqlException with the following message:
The exception doesn't help much because the Entries property is empty, so I can't really determine why the SaveChanges() call is not working.
Steps to reproduce
Don't have one at the moment because I can't determine what's wrong with the update -- that's exactly where DbUpdateException.Entries would come in handy. Catch 22.
I'll reduce my dataset to see if I can isolate the instance that's causing this issue.
Further technical details
EF Core version: 3.1
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: NET Core 3.1
Operating system: Windows 10 2004
IDE: Visual Studio 2019 16.6.5
The text was updated successfully, but these errors were encountered: