📅  最后修改于: 2022-03-11 14:56:35.338000             🧑  作者: Mango
const sql1 = await this.attendanceRepository
.createQueryBuilder("attendance")
.innerJoin("attendance.child", "child")
.select(["attendance.childId","child.class","CONCAT(child.firstName, child.lastName)"])
.where("attendance.id= :id", { id: id})
.getQuery();
console.log(sql1);