TypeORM: update item and return it

I just found out that I can do this with the .save method:

return this.taskRepository.save({
    id: task.id,
    state,
    dueDate
});

According to the docs (section save), partial updates are supported as well:

Also supports partial updating since all undefined properties are skipped.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)