Get a Quote Right Now

Edit Template

Joining any entity or table

You can join not only relations, but also other unrelated entities or tables. Examples:

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

Share

Leave a Reply

Your email address will not be published. Required fields are marked *