Error when using multiple .Include()

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
avalor
Posts: 15
Joined: Tue 18 Feb 2014 17:39

Error when using multiple .Include()

Post by avalor » Fri 04 Apr 2014 08:45

I'm using dotConnect for Oracle 8.3.125 and EF6.1 and I'm getting an error when trying to run this query:

Code: Select all

var res = db.PROPIEDADVALOR
    .Include(x => x.COORDENADA)
    .Include(x => x.PROPIEDAD.COMPOSICION)
    .Include(x => x.PROPIEDADVALORCOMPOSICION)
    .Include(x => x.USUARIO)
    .Where(x => x.PROPIEDADID == id &&
       x.COORDENADA.Any(c => c.FECHAHORAPDA >= fecha && c.FECHAHORAPDA < DbFunctions.AddDays(fecha, 1).Value && c.LATITUD != 0 && c.LONGITUD != 0));
The error says: 'System.Data.Entity.Core.EntityCommandCompilationException - An error occurred while preparing the command definition. See the inner exception for details.
System.NotSupportedException - Casting to 'r' is not supported.'

If I comment the first or the second .Include(), it works well, also if I comment two of the Includes.

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

Re: Error when using multiple .Include()

Post by Shalex » Fri 04 Apr 2014 11:48

Could you please send us a small test project with the corresponding DDL/DML script for reproducing the issue in our environment?

avalor
Posts: 15
Joined: Tue 18 Feb 2014 17:39

Re: Error when using multiple .Include()

Post by avalor » Fri 04 Apr 2014 16:34

OK. I'll try to reproduce it on next monday

avalor
Posts: 15
Joined: Tue 18 Feb 2014 17:39

Re: Error when using multiple .Include()

Post by avalor » Mon 07 Apr 2014 07:54

Hi!
I've just sent you a small test project reproducing the issue.

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

Re: Error when using multiple .Include()

Post by Shalex » Mon 07 Apr 2014 13:27

Thank you for the test project. We are investigating the issue.

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

Re: Error when using multiple .Include()

Post by Shalex » Wed 09 Apr 2014 14:17

The bug with using multiple .Include() with spatial columns is fixed. We will notify you when the corresponding build of dotConnect for Oracle is available for download.

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

Re: Error when using multiple .Include()

Post by Shalex » Thu 10 Apr 2014 13:37

New build of dotConnect for Oracle 8.3.135 is available for download!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=1&t=29348.

avalor
Posts: 15
Joined: Tue 18 Feb 2014 17:39

Re: Error when using multiple .Include()

Post by avalor » Tue 15 Apr 2014 10:03

I can confirm that the fix works perfectly.

Thank you so much

Post Reply