updateselect

This commit is contained in:
2024-12-05 16:41:47 +09:00
parent b3ac2714a1
commit 945d807716

View File

@ -99,7 +99,7 @@ export class UserActivityController {
.leftJoinAndMapOne('u.username', User, 'u', 'u.id = id_user')
.where(whereAttr, whereVal);
const res_list = userRepository.createQueryBuilder()
.select('UserActivity.*, u.username')
.select(['UserActivity.*', 'u.username'])
// .addSelect('(SELECT u.username FROM users u WHERE u.id = id_user)', 'username')
.leftJoinAndMapOne('u.username', User, 'u', 'u.id = id_user')
.where(whereAttr, whereVal)