This repository has been archived by the owner on Apr 6, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Nuxt 3 nitro + mikro-orm #5603
Labels
Comments
some file can be taken from https://github.com/max5432112345/nuxt-mikro |
need useNext() helper??? |
+1 Stuck at this too |
@max5432112345 here a approach that works for me, but is defenitly not the end-solution: Create a server middleware with following content which initialize the database connection if no one exists:
A client file:
Now you can use in your /api/foo.ts api endpoint the client (orm) as following:
Hope it helps you a bit |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Environment
Linux
v16.15.1
3.0.0-rc.4
[email protected]
vite
-
-
-
Reproduction
OR
DI file
Describe the bug
No next function. In legacy exist but no effect like with old version of fastify here
nestjs/nest#8837
nodejs/node#41285
[nitro] [dev] [unhandledRejection] ValidationError: Using global EntityManager instance methods for context specific actions is disallowed. If you need to work with the global instance's identity map, use
allowGlobalContext
configuration option orfork()
instead.Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: