Skip to content

Commit

Permalink
🚨 :: find all group by에 name 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
shine-jung committed Nov 22, 2023
1 parent 8ff3a5d commit 5b4be9f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/print-shop/print-shop.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class PrintShopService {
if (tagIds && tagIds.length) {
queryBuilder
.andWhere('tag.id IN (:...tagIds)', { tagIds })
.groupBy('printShop.id')
.groupBy('printShop.id, printShop.name')
.having('COUNT(DISTINCT tag.id) = :tagCount', {
tagCount: tagIds.length,
});
Expand Down
2 changes: 1 addition & 1 deletion src/product/product.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class ProductService {
if (tagIds && tagIds.length) {
queryBuilder
.andWhere('tag.id IN (:...tagIds)', { tagIds })
.groupBy('product.id')
.groupBy('product.id, product.name')
.having('COUNT(DISTINCT tag.id) = :tagCount', {
tagCount: tagIds.length,
});
Expand Down

0 comments on commit 5b4be9f

Please sign in to comment.