Saving NULL geometries in Oracle DB with EF Core
We are migrating our solution from EF6 to EF Core and .NET Framework to .NET 6.
When saving an entity using EF Core (using UseNetTopologySuite on the DbContext) where a column of type Geometry is NULL, it results in the following error:
- Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Devart.Data.Oracle.OracleException: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException
- ORA-06512: at "MDSYS.SDO_JAVA_STP", line 79
- ORA-06512: at "MDSYS.SDO_UTIL", line 6256
- ORA-06512: at "MDSYS.SDO_GEOMETRY", line 180
- ORA-06512: at line 1
- ORA-06512: at line 4
Seems like Devart dotConnect for Oracle 10.0 doesn't handle NULL geometries properly. It did work with EF6 and dotConnect v9.14.1353. Is there some specific approach we need to use to save NULL geometries with EF Core?