If you want to select only some entity properties, you can use the following syntax:
const users = await dataSource
.getRepository(User)
.createQueryBuilder("user")
.select(["user.id", "user.name"])
.getMany()
Logic Paradise © 2024. All rights reserved. Block B, STPI Srinagar, Jammu and Kashmir 190005
WhatsApp us