ORA-29532 Malformed WKT

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
martijndijkstra
Posts: 1
Joined: Wed 24 Aug 2022 16:43

ORA-29532 Malformed WKT

Post by martijndijkstra » Wed 24 Aug 2022 16:46

Saving an entity via Entity Framework Core (.NET 6) using UseNetTopologySuite where a column of type Geometry is NULL results in the following error.

Code: Select all

Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
 ---> Devart.Data.Oracle.OracleException (0x80004005): ORA-29532: Java call terminated by uncaught Java exception: java.sql.SQLException: Malformed WKT
ORA-06512: at "MDSYS.SDO_UTIL", line 201
ORA-06512: at "MDSYS.SDO_GEOMETRY", line 76
ORA-06512: at line 1
This is because the SQL that dotConnect generates uses the SDO_GEOMETRY function.

Code: Select all

UPDATE C1LOCATIONS
   SET GEOMETRY_POINT = SDO_GEOMETRY ( :p21, 28992), GEOMETRY_SHAPE = SDO_GEOMETRY ( :p22)  WHERE LCNRLC = :p207
So this doesn't work...

Code: Select all

UPDATE C1LOCATIONS
   SET GEOMETRY_POINT = SDO_GEOMETRY (CAST (NULL AS VARCHAR2 (256 CHAR)), 28992),
       GEOMETRY_SHAPE = SDO_GEOMETRY (CAST (NULL AS VARCHAR2 (256 CHAR)))  WHERE LCNRLC = :p207;
... and this does work...

Code: Select all

UPDATE C1LOCATIONS
   SET GEOMETRY_POINT = NULL, GEOMETRY_SHAPE = NULL  WHERE LCNRLC = :p207;
Does dotConnect for Oracle not support geometries with the value NULL? If not, how do we express that?

Thank you for the assistance!

Product: dotConnect for Oracle
Product Version: 10.0.0

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: ORA-29532 Malformed WKT

Post by Shalex » Fri 07 Oct 2022 18:17

Thank you for your report. We will investigate the issue and notify you when it is fixed.

Post Reply