Skip to content

Commit 65819d2

Browse files
committed
MAGETWO-47451: 'in' filter does not work in list APIs
- added conversion from string to array for 'in' and 'nin' in Mysql Adapter
1 parent 38dd0ed commit 65819d2

File tree

1 file changed

+3
-0
lines changed
  • lib/internal/Magento/Framework/DB/Adapter/Pdo

1 file changed

+3
-0
lines changed

lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2789,6 +2789,9 @@ public function prepareSqlCondition($fieldName, $condition)
27892789
if (($key == 'seq') || ($key == 'sneq')) {
27902790
$key = $this->_transformStringSqlCondition($key, $value);
27912791
}
2792+
if (($key == 'in' || $key == 'nin') && is_string($value)) {
2793+
$value = explode(',', $value);
2794+
}
27922795
$query = $this->_prepareQuotedSqlCondition($conditionKeyMap[$key], $value, $fieldName);
27932796
} else {
27942797
$queries = [];

0 commit comments

Comments
 (0)