【发布时间】:2021-06-28 13:21:47
【问题描述】:
我正在使用 PostgresSQL,我正在尝试删除列中的所有数据(我的实体由 Id an name 组成),但是当我运行代码时出现错误消息:
这是代码(我使用的是 NestJs,TypeOrm):
@Injectable()
export class ClearLinioBrands {
constructor(
@InjectRepository(LinioBrand)
private linioBrandRepo: Repository<LinioBrand>,
) {}
async execute(): Promise<void> {
const existingBrands = await this.linioBrandRepo.find();
await this.linioBrandRepo.remove(existingBrands);
}
}
但是,控制台向我抛出了这个错误:
'错误:绑定消息有9914个参数格式但0个参数'
此实体中的总行数为 115900 行,这是此行为的原因吗?我该怎么办?
谢谢
【问题讨论】:
标签: postgresql pagination nestjs typeorm