I'm using PostgresSQL and I'm trying to remove all the data that I have in the Columns (My Entity is composed by Id an name ), but when I run the code an error message appear:
This is the code (I'm using 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);
}
}
However, console throws me this error:
'ERROR: bind message has 9914 parameter formats but 0 parameters'
The total row's in this Entity is 115900 rows, is this the reason for this behavior ? What should I do ?
Thanks