Skip to content

Commit

Permalink
๐Ÿ‘€ :: chore :: TypeORM ๋ฌธ๋ฒ• ์ˆ˜์ •
Browse files Browse the repository at this point in the history
  • Loading branch information
12xii committed Dec 27, 2023
1 parent 2aa9a8b commit 0b8d902
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/chat/chat.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,11 @@ export class ChatService {
*
* => ๊ทธ๋ฃน๋ณ„๋กœ ๊ฐ€์žฅ ์ตœ์‹ ์˜ ์ฑ„ํŒ… ์•„์ด๋””๋ฅผ ๊ฐ€์ ธ์˜ด
* */
const thisQuery = await this.groupEntity
const thisQuery = await this.chattingEntity
.createQueryBuilder('qb')
.select('MAX(chat.chatID) AS chatID')
.from(Chatting, 'chat')
.addFrom(Group, 'group')
.where('group.groupID = chat.groupID')
.select('MAX(qb.chatID) AS chatID')
.from(Group, 'group')
.where('group.groupID = qb.groupID')
.groupBy('group.groupID')
.getRawMany();

Expand Down

0 comments on commit 0b8d902

Please sign in to comment.