Generic OrderBy broken in version 9.6.540

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
mariuszs
Posts: 4
Joined: Wed 27 Jun 2018 18:36

Generic OrderBy broken in version 9.6.540

Post by mariuszs » Wed 27 Jun 2018 18:47

Hi,

in my project I've implemented sorting like:

var parameter = Expression.Parameter(typeof(TEntity), "e");

var property = Expression.Property(parameter, sortData.PropertyName);
var converted = Expression.Convert(property, typeof(object));
var expression = Expression.Lambda<Func<TEntity, dynamic>>(converted, parameter);

if (sortData.SortType == SortType.Ascending)
sortedResults = queryable.OrderBy(expression);
(...)

It's most common way to implement sorting Entity by given string propertyName.

It was working in version 9.5.520, now materializing results is throwing exceptions like:

System.InvalidOperationException: No mapping to a relational type can be found for the CLR type 'object'.

when property is string or

System.IndexOutOfRangeException: Index was outside the bounds of the array.

when property is long. There is no type that is working now.

Version of dotConnect you have released is now blocking us from migration to EF Core 2.1.

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

Re: Generic OrderBy broken in version 9.6.540

Post by Shalex » Thu 28 Jun 2018 19:05

Thank you for your report. We have reproduced the bug and are working on it. We will provide the fix as soon as possible.

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

Re: Generic OrderBy broken in version 9.6.540

Post by Shalex » Fri 13 Jul 2018 20:15

The bug with paging in EF Core 2.1 is fixed. The internal build with the fix: https://www.devart.com/pub/nuget_oracle_9_6_554.zip.

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

Re: Generic OrderBy broken in version 9.6.540

Post by Shalex » Fri 20 Jul 2018 11:13

New build of dotConnect for Oracle 9.6.558 is available for download: viewtopic.php?f=1&t=37474.

Post Reply