You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Grid string filter doesn't work properly when filtering by multiple relations. The expression builder joins foreign relations using an INNER JOIN – if any relation is missing, nothing will be returned. The filter would work correctly if LEFT JOIN was used.
Steps to reproduce
Filter by multiple fields, eg. in the order admin of the Sylius framework:
SELECT * FROM sylius_customer c
INNER JOIN sylius_shop_user u ON c.id = u.customer_id
INNER JOIN sylius_address a ON a.id = c.default_address_id
WHERE (u.email LIKE '%value%' OR a.company LIKE '%value%')
Filtering by existing customer e-mail won't work if the customer has no default address.
Filtering by valid company name won't work if the customer has no user
Possible Solution
Use LEFT JOINs, let WHERE statements do their job.
The text was updated successfully, but these errors were encountered:
Description
Grid
string
filter doesn't work properly when filtering by multiple relations. The expression builder joins foreign relations using anINNER JOIN
– if any relation is missing, nothing will be returned. The filter would work correctly ifLEFT JOIN
was used.Steps to reproduce
Filter by multiple fields, eg. in the
order
admin of the Sylius framework:Generated SQL query (pseudo code):
Possible Solution
Use
LEFT JOIN
s, letWHERE
statements do their job.The text was updated successfully, but these errors were encountered: