diff --git a/services/product/ProductMysqldb.php b/services/product/ProductMysqldb.php index 0403030f7fc39bb84c9d0d42e72e7cffb5f18dc1..a4b3795b56048c08b83385b7b901d027f09369cd 100644 --- a/services/product/ProductMysqldb.php +++ b/services/product/ProductMysqldb.php @@ -896,6 +896,9 @@ class ProductMysqldb extends Service implements ProductInterface return []; } $select = $filter['select']; + if (!in_array('id', $select)) { + $select[] = 'id'; + } $query = $this->_productModel->find()->asArray(); $query->where($where); $query->andWhere(['status' => $this->getEnableStatus()]);