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()
Your email address will not be published. Required fields are marked *
Logic Paradise © 2025 All rights reserved. Block B, STPI Srinagar, Jammu and Kashmir 190005
WhatsApp us