联查任何实体或表

你不仅能联查关系,还能联查任何其他实体或表。

例如:

  1. const user = await createQueryBuilder("user")
  2. .leftJoinAndSelect(Photo, "photo", "photo.userId = user.id")
  3. .getMany();
  1. const user = await createQueryBuilder("user")
  2. .leftJoinAndSelect("photos", "photo", "photo.userId = user.id")
  3. .getMany();