Операторы ['~', '! ~'] В фильтре [website1] не поддерживаются - PullRequest
0 голосов
/ 10 февраля 2020

Я хочу получить потенциальных клиентов с помощью веб-API. Я использовал http: /// admin / api / lead? Filter [website1] ~, но получил

[{"title":"filter constraint","detail":"The operator \"contains\" is not supported.","source":"filter[website1]"}]

Я добавил в / vendor / oro / crm / src / Oro / Bundle / SalesBundle / Resources / config /oro/api.yml новый фильтр: в раздел Oro\Bundle\SalesBundle\Entity\Lead: filters: я добавил новый фильтр website1: website1: data_type: string allow_array: true options: case_insensitive: true operators: ['=', '!=', '*', '!*', '~', '!~', '^', '!^', '$', '!$'], после чего успешно запустил

php bin/console oro:api:cache:clear

и вижу этот фильтр в разделе фильтров, когда run php bin/console oro:api:config:dump users

 website1:
            allow_array: true
            options:
                case_insensitive: true
            operators:
                - eq
                - neq
                - exists
                - neq_or_null
                - contains
                - not_contains
                - starts_with
                - not_starts_with
                - ends_with
                - not_ends_with
            data_type: string

Но, в любом случае, ответное состояние, содержащее оператор «Содержит», не поддерживается. Что я делаю не так? и как заставить фильтр использовать этот оператор и оператор ^ et c.

...