diff --git a/lib/internal/Magento/Framework/Model/ResourceModel/Db/Collection/AbstractCollection.php b/lib/internal/Magento/Framework/Model/ResourceModel/Db/Collection/AbstractCollection.php index b57755ed7eafa..a88e013f5d2fe 100644 --- a/lib/internal/Magento/Framework/Model/ResourceModel/Db/Collection/AbstractCollection.php +++ b/lib/internal/Magento/Framework/Model/ResourceModel/Db/Collection/AbstractCollection.php @@ -346,7 +346,9 @@ public function addExpressionFieldToSelect($alias, $expression, $fields) $fullExpression = str_replace('{{' . $fieldKey . '}}', $fieldItem, $fullExpression); } - $this->getSelect()->columns([$alias => $fullExpression]); + $fullExpression = new \Zend_Db_Expr($fullExpression); + $this->_fieldsToSelect[$alias] = $fullExpression; + $this->_fieldsToSelectChanged = true; return $this; }