Magento 2:addFieldToFilter检查NULL不起作用


10

我正在尝试从包含parent_item_id NULL值的数据库中获取记录。

$order_ = $this->_objectManager->create('Vendor\Module\Model\Saleslist')
                    ->getCollection()
            ->addFieldToFilter(
                'order_id',
                $orderId
            )->addFieldToFilter(
                'parent_item_id',
                ['eq' => NULL]
            );

并且还想添加parent_item_id相等的NULL''字符串检查。

Answers:



By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.