Skip to content

Commit

Permalink
Fix: Passing an array for the first argument to QueryBuilder::select(…
Browse files Browse the repository at this point in the history
…) is deprecated (#120)
  • Loading branch information
blankse authored Sep 22, 2023
1 parent e9d3ac2 commit ff6ff28
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/OrderManager/Order/Listing.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,19 @@ public function getQueryBuilder(): DoctrineQueryBuilder
if (!$this->queryBuilder) {
// init
$queryBuilder = Db::getConnection()->createQueryBuilder();
$queryBuilder->select(['SQL_CALC_FOUND_ROWS 1', 'order.oo_id AS OrderId']);
$queryBuilder->select('SQL_CALC_FOUND_ROWS 1', 'order.oo_id AS OrderId');
$queryBuilder->from('object_query_' . OnlineShopOrder::classId(), '`order`');
$queryBuilder->addSelect(['order.currency AS Currency']);
$queryBuilder->addSelect('order.currency AS Currency');

// join ordered products
$this->joinItemsAndSubItems($queryBuilder);

// group by list type
if ($this->getListType() == self::LIST_TYPE_ORDER_ITEM) {
$queryBuilder->addSelect(['orderItem.oo_id AS Id']);
$queryBuilder->addSelect('orderItem.oo_id AS Id');
$queryBuilder->groupBy('OrderItemId');
} else {
$queryBuilder->addSelect(['order.oo_id as Id']);
$queryBuilder->addSelect('order.oo_id as Id');
$queryBuilder->groupBy('OrderId');
}

Expand Down

0 comments on commit ff6ff28

Please sign in to comment.