Page 1 of 1

Re: Spatial linq queries not working

Posted: Sat 20 Nov 2021 11:10
by Shalex
You are working with EF Core 5 and NetTopologySuite 2.1, aren't you?

We will investigate the issue with mapping errors and notify you.

Re: Spatial linq queries not working

Posted: Wed 24 Nov 2021 11:19
by Shalex
The investigation is in progress. As soon as we have any results, we will contact you.

Re: Spatial linq queries not working

Posted: Wed 01 Dec 2021 14:39
by Shalex
* The bug with throwing the "Expression in SQL tree does not have type mapping assigned" error with NetTopologySuite in EF Core is fixed
* The bug with calling methods and properties of the Geometry class and its child classes, when the type member returns bool, with NetTopologySuite in EF Core is fixed

We will notify you when a new public build of dotConnect for Oracle is available for download.

Re: Spatial linq queries not working

Posted: Thu 02 Dec 2021 14:40
by Shalex
The NuGet package with the fixes can be downloaded from http://download.devart.com/nuget_oracle_9_14_1399.zip.

If you are interested in getting the licensed installation, contact us via contact form and specify the email used when registering dotConnect for Oracle.

Re: Spatial linq queries not working

Posted: Fri 03 Dec 2021 11:23
by Shalex
Please make sure that the target framework of your project is .NET 5 and you work with EF Core 5.

Re: Spatial linq queries not working

Posted: Tue 07 Dec 2021 15:40
by Shalex
Thank you for your reports. We will investigate all issues and notify you about the results.

Re: Spatial linq queries not working

Posted: Tue 21 Dec 2021 08:57
by Shalex
  • The config.SpatialOptions settings are supported in EF Core
  • The bug with throwing ORA-00920 by the GeometryCollection.Intersects method when using NetTopologySuite spatial service in EF Core 5 is fixed
  • The bug with throwing ORA-00920 by the Geometry.Disjoint method when using NetTopologySuite spatial service in EF Core 3 and EF Core 5 is fixed
  • The bug with throwing the "Unexpected primitive type kind 'r'." error when using NetTopologySuite spatial service with a geometric constant in EF Core 3 and EF Core 5 is fixed
We will notify you when a new public build of dotConnect for Oracle is available for download.

Re: Spatial linq queries not working

Posted: Tue 21 Dec 2021 17:14
by Shalex
dotConnect for Oracle 9.15 is released: viewtopic.php?f=1&t=51634.

Re: Spatial linq queries not working

Posted: Tue 21 Dec 2021 17:34
by Shalex
vmakkenz wrote: Thu 18 Nov 2021 10:46 I'm trying to do a simple linq query retrieving the building that contains a point

Code: Select all

        var point = new GeometryFactory().CreatePoint(new Coordinate(233569.922, 556664.502));
        var buildings = db.Building.Where(g => g.Geometry.Contains(point));
But I keep getting mapping errors

System.InvalidOperationException : Expression '@__point_0' in SQL tree does not have type mapping assigned.

Code: Select all

        var buildings = db.Building.Where(g => g.Geometry.Contains(new GeometryFactory().CreatePoint(new Coordinate(233569.922, 556664.502))));
System.InvalidOperationException : Expression 'POINT (233569.922 556664.502)' in SQL tree does not have type mapping assigned.

Using
DevArt 9.14.1369
.NET 5.0/6.0
dotConnect for Oracle v9.15 also includes the following fixes:
  • The bug with throwing the "Expression in SQL tree does not have type mapping assigned" error with NetTopologySuite in EF Core is fixed
  • The bug with calling methods and properties of the Geometry class and its child classes, when the type member returns bool, with NetTopologySuite in EF Core is fixed

Re: Spatial linq queries not working

Posted: Thu 27 Jan 2022 16:41
by Shalex
The config.SpatialOptions.PreferSpatialOperators configuration option is added (default value is False) to provide the possibility of using spatial operators instead of functions from the SDO_GEOM package.

Refer to viewtopic.php?f=1&t=53190.