我想比较一个在relation中的id和我在查询中给出的另一个id,并获得所有信息,例如:
async getAllPhoto(id: string) {
var photo = await this._photoRepository.find({
relations: {
catalogue: true,
},
where: { catalogue: { id: Not(id) } },
});
return photo;
}
我尝试了这个方法,但是得到了一个空数组。
1条答案
按热度按时间kq4fsx7k1#
当你在nestjs中开发项目时,
你最好在你的数据库配置中启用“logging”:true!
您将从ORM中找到所有原始SQL。