Dapper-Extensions icon indicating copy to clipboard operation
Dapper-Extensions copied to clipboard

42883: operator does not exist: text[] = text

Open rgustavsson opened this issue 5 years ago • 1 comments

I'm using Postgresql and DapperExtensions 1.6.3.

This issue is all about storing a string array and querying on that array.

I have a class with the following property:

public string[] StringArray { get; set; }

and I have a postgres database column like this:

StringArray TEXT[]

and my predicates looks like this:

pg = new PredicateGroup { Operator = GroupOperator.And, Predicates = new List<IPredicate>() };
pg.Predicates.Add(Predicates.Field<AppCalendarEvent>(f => f.TenantId, Operator.Eq, tenantId));
pg.Predicates.Add(Predicates.Field<AppCalendarEvent>(f => f.StringArray, Operator.Eq, new List<string>() { userId } ));

And the result of a GetPage (or GetList) is:

Npgsql.PostgresException: '42883: operator does not exist: text[] = text'

Anyone experienced something similiar?

rgustavsson avatar Mar 31 '20 09:03 rgustavsson

Did you try version 1.7.0?

valfrid-ly avatar Feb 22 '22 21:02 valfrid-ly