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

Popular posts from this blog

python - Referencing Data From a 2D Histogram -

c# - Derived UserControl layout resets after build -

php - MySQL LIMIT results with INNER JOIN with more than 2 tables -