#74295parseComparison doesn't accept fields without relation for use with contains()
Description
In the query builder you can use contains() for fields with a relation or for fields that are of type ‘select’ and have maxitems > 1. There are also other fields (such as ‘keywords’) which contain comma separated values, but do not have a relation and are not of type ‘select’. For these fields a beautiful exception is thrown.
The alternative for such fields is to use the LIKE monstrosity (field LIKE ‘,keyword,’ OR field LIKE ‘,keyword’ OR field LIKE ‘keyword,’ or field = ‘keyword’) which will probably be even worse performance wise than a FIND_IN_SET().
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 1
-
Georg Ringer commented and changed status
NewRejected 03/30/25, 09:22
Hey Jigal,
just have seen this quite old issue. Even though the backend might be a select field this doesn’t mean this is a relation and therefore the proper query must be textbased using
likeorfind_in_set. As alternative use a proper relation to use such methods then.therefore closing the issue