You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a @Transactional() function with runOnTransactionRollback(() => this.someRepository.save()) in it.
So, when the function caught error and rejects with rollback, the this.someRepository.save() have called and then I receive the QueryRunnerAlreadyReleasedError error.
The text was updated successfully, but these errors were encountered:
Hi @ekifox / @cassinaooo - Sorry for the late response. I missed this one.
Basically, the runOnTransactionRollback() and all the other Hooks, are informal only, and cannot be used to do database operations with the same repository.
I believe an external try/catch should be used instead
@ekifox - As I said, the solution for that is to use an external (in the Transactional context) to call the transactional method with a try/catch block
In the catch block you can call the repository.save()
I have a
@Transactional()
function withrunOnTransactionRollback(() => this.someRepository.save())
in it.So, when the function caught error and rejects with rollback, the
this.someRepository.save()
have called and then I receive the QueryRunnerAlreadyReleasedError error.The text was updated successfully, but these errors were encountered: