Skip to content
Discussion options

You must be logged in to vote

Note that you still have the RequestContext middlewares set up, it's the default behaviour of the nest orm adapter (see https://github.com/mikro-orm/nestjs/blob/master/src/mikro-orm-core.module.ts#L262-L264), and you are not disabling that in the forRoot call. That would be another way to fix this (you should do it regardless if you want to use nest request scopes - which I would btw discourage, they will have perf penalty, bigger than the ALS used for RequestContext middleware, and you don't need those here, you can use ALS to keep a reference to the request object too).

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@B4nan
Comment options

Answer selected by jcelmeta14
@jcelmeta14
Comment options

@B4nan
Comment options

@jcelmeta14
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #230 on November 20, 2025 15:18.