Search found 1 match

by martijndijkstra
Wed 24 Aug 2022 16:46
Forum: dotConnect for Oracle
Topic: ORA-29532 Malformed WKT
Replies: 1
Views: 16293

ORA-29532 Malformed WKT

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