EntityFramework query with string.EndsWith throw exception

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
Settler
Posts: 19
Joined: Mon 01 Mar 2010 16:32

EntityFramework query with string.EndsWith throw exception

Post by Settler » Thu 26 May 2011 12:12

I'm have simple query:

Code: Select all

using(var entities = new DataEntities())
{
    var test = entities.TestItems.Where(o=>o.Name.EndsWith("v")).ToList();
}
After runnings this code I catch this exception:
System.Data.EntityCommandCompilationException: An error occurred while preparing the command definition. See the inner exception for details.

System.NotSupportedException: The EDM function 'Edm.Reverse' is not supported.
at Devart.Common.Entity.ay.e(b7 A_0)
at Devart.Common.Entity.bd.a(b7 A_0)
at Devart.Common.Entity.b7.Accept[TResultType](EV`1 visitor)
at Devart.Common.Entity.bd.a(br A_0, br A_1, ck A_2)
at Devart.Common.Entity.bd.a(b7 A_0, br A_1, ck A_2)
at Devart.Common.Entity.bd.a(cl A_0)
at Devart.Common.Entity.cl.Accept[TResultType](EV`1 visitor)
at Devart.Common.Entity.bd.a(aq A_0, br A_1, Boolean A_2)
at Devart.Common.Entity.bd.a(bh A_0)
at Devart.Common.Entity.bh.Accept[TResultType](EV`1 visitor)
at Devart.Common.Entity.bd.a(br A_0, String A_1, TypeUsage A_2, q& A_3)
at Devart.Common.Entity.bd.a(ci A_0)
at Devart.Common.Entity.ci.Accept[TResultType](E...).
.....................

Methods "Contains" and "StartsWith" is work perfectly.

dotConnect for PostgreSql 5.30.160.

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

Post by Shalex » Fri 27 May 2011 08:52

We will investigate the issue and notify you about the results as soon as possible.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Tue 31 May 2011 09:19

Thank you for the assistance, the error is fixed.
The build containing the fix will be available in a week or so.

Settler
Posts: 19
Joined: Mon 01 Mar 2010 16:32

Post by Settler » Tue 31 May 2011 10:14

Thank you. We will wait.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Wed 01 Jun 2011 17:02

We have released the new 5.30.165 build of dotConnect for PostgreSQL. This build can be dowloaded from here (the trial version) or from Registered Users' Area (for users with active subscription only).
For the detailed information about the improvements and fixes available in dotConnect for PostgreSQL 5.30.165, please refer to this announcement.

Post Reply