-
Notifications
You must be signed in to change notification settings - Fork 3.3k
InvalidCastException on entities referencing Owned types containing NetTopologySuite Point properties #23282
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
@smitpatel @bricelam I think we've seen this or a similar issue with BufferedDataReader before. |
Was different error that result value wasn't cast properly |
Resolves #23282 Resolves #23104 Issue: When buffering is enabled, first time when we read particular property slot, we create expression to read into buffer and out of the buffer. We mistakenly bypassed changing expression to read from value buffer when same property slot was being read again, causing cast errors Also matches the type being read out of the buffered data reader
Resolves #23282 Resolves #23104 Issue: When buffering is enabled, first time when we read particular property slot, we create expression to read into buffer and out of the buffer. We mistakenly bypassed changing expression to read from value buffer when same property slot was being read again, causing cast errors Also matches the type being read out of the buffered data reader
I'm also getting the same error, Don't know what is going on |
Since upgrading to 5.0.0 I'm finding that attempts to load entities referencing Owned types containing NetTopologySuite Point properties fails. This worked before; the only change to the project has been to retarget to .NET 5.0 and upgrade packages to 5.0.0. Aside from this issue, my project builds and runs just fine.
Steps to Reproduce
I've created a barebones project here which demonstrates the issue. I used the ASP.NET Core Web Application project template, upgraded it to .NET 5.0 and added Microsoft.EntityFrameworkCore.SqlServer.NetTopologySuite 5.0.0 and a couple of simple enties - a
Location
, which owns anAddress
which has aPoint
property.Stack Trace
Output
Provider + Version Info
EF Core version: 5.0.0
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET 5.0
Operating system: Windows 10
IDE: Visual Studio 2019 16.8
The text was updated successfully, but these errors were encountered: