Entity Framework & JSON support

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
khorvat
Posts: 6
Joined: Fri 13 Dec 2013 09:35

Entity Framework & JSON support

Post by khorvat » Wed 19 Mar 2014 13:50

Hi,

We have an issue with Json support when using EF 6.0.1 and Contains (translated to Like) in our query.

EF query

Code: Select all

query.Where(p => p.Json.Contains(text).First()
EF Output:

Code: Select all

... ("Filter1"."Json" LIKE :p__linq__4 ESCAPE '/') ...
Error that we get:
operator does not exist: json ~~ text

I think that in case of Contains/Like you should cast the Json field to text if possible e.g.

Code: Select all

... ("Filter1"."Json"::text LIKE :p__linq__4 ESCAPE '/') ...
Regards

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Entity Framework & JSON support

Post by MariiaI » Thu 20 Mar 2014 09:13

Thank you for the report on this. We have reproduced this issue. We will investigate it and inform you about the results as soon as possible.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Entity Framework & JSON support

Post by MariiaI » Fri 28 Mar 2014 06:29

The use of the JSON data type in string canonical functions and comparison operators (equality and inequality) is supported.
New build of dotConnect for PostgreSQL 7.3.125 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/postgr ... nload.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?t=29241.

Post Reply