Dapper-Extensions
Dapper-Extensions copied to clipboard
42883: operator does not exist: text[] = text
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?
Did you try version 1.7.0?