如何将一个orderby添加到typo3流queryBuilder查询?

时间:2014-10-30 21:37:48

标签: doctrine-orm query-builder typo3-flow

这是我的代码,我对现有的工作代码所做的只是添加orderby:

$queryBuilder->select('pa1')
            ->from('\SeeThroughWeb\Shop\Domain\Model\ProductArticle', 'pa1')
            ->join('pa1.productPrices', 'pp1')
            ->join('pa1.product', 'p')
            ->where('pp1.salePrice IN (' . $subQueryBuilder . ') AND pa1.status = ' . \SeeThroughWeb\Shop\Domain\Model\ProductArticle::STATUS_ACTIVE . ' AND (pa1.stock > 0 OR pa1.displayOutOfStock = 1) AND p.status = ' . \SeeThroughWeb\Shop\Domain\Model\Product::STATUS_ACTIVE . ' AND p.isFeatured = 1 AND p.deleted = 0')
            ->groupBy('p')
            ->orderBy('p.isgiftcard', 'ASC');
    $result = $query->execute();

似乎不起作用,它给了我例外:

MetaDataController.php line 176 

我做错了什么?

0 个答案:

没有答案