php - How to group by only by one reference in Doctrine 2 -
i have
$qb = $this->getfindquerybuilder(); $entityalias = $this->getentityalias(); $qb->select([ $entityalias, 'product', 'category', 'categories', 'productcategoriescategory', 'productcategoriesproduct', ]); $qb->leftjoin("{$entityalias}.product", 'product'); $qb->leftjoin("{$entityalias}.category", 'category'); $qb->leftjoin("product.categories", 'categories'); $qb->leftjoin("categories.category", 'productcategoriescategory'); $qb->leftjoin("categories.product", 'productcategoriesproduct');
and
$qb->groupby('product.id');
so when added group expression correctly grouping product.id mistakenly grouping productcategoriesproduct.id, product , productcategoriesproduct same entity... need grouping product.id select productcategoriesproduct inside
Comments
Post a Comment