Can we commit a transaction when an error happens, if we wanted to.
@Transactional()
async savePhoneNumber(...) {
await this.userRepo.save({ phone: ... })
// I would like the transaction to commit at this point, so that the error doesn't cause it to rollback
throw new Error('fake error')
}
Side note, something can be achieved with @Transactional( { propagation: Propagation.NESTED } ), but then it's a breeze for somebody to come and introduce deadlocks, and we already had few such cases, thus we try to avoid it.