Update
Classic update, receives as parameter the type of entity to be updated and can be used with a mapper.
data: IExampleDTO;
const example = await this.examplesRepository.findBy(
{ where: { id: 123 } },
trx,
);
example.name = data.name;
example.description = data.description;
await this.examplesRepository.update(example, trx);
Was this helpful?