core icon indicating copy to clipboard operation
core copied to clipboard

Select field value search doesn't work with PostgreSQL

Open vlad-ghita opened this issue 2 years ago • 0 comments

Description

First reported in Slack: https://boltcms.slack.com/archives/C0NJEK631/p1651144369168399

With PostgreSql database, when select field has more than 1 value, query doesn't match when needle is in position > 0.

Eg: searching for bar returns only record ID_1.

id select value
0 ["foo", "bar"]
1 ["bar", "baz"]
2 ["baz"]

Root

There is no Doctrine json function JSON_SEARCH for PostgreSQL database.

This line checks for feature existence. https://github.com/bolt/core/blob/master/src/Storage/SelectQuery.php#L599

Unless feature is available, Bolt offers limited support.

vlad-ghita avatar Apr 28 '22 14:04 vlad-ghita