Comments (7)
I was just about to write the same but realized what the issue is about. The decorator wraps given method but it won't return its return value.
The return value is ignored on this line:
nestjs/src/mikro-orm.common.ts
Line 22 in 4e0bad0
Anyway, next time please share some code when filing a bug report, this is not the right way to do it...
from nestjs.
4.3.1 is out, sry it took so long, i always forget about this package (and always get notifications like this when i am away from laptop) 🤷
from nestjs.
It is unclear what your intentions are exactly. Could you create a repository with a reproduction of the bug? That is much easier to debug then these steps to reproduce.
from nestjs.
The "problem" is also in RequestContext
class from Mikro-Orm project:
https://github.com/mikro-orm/mikro-orm/blob/7e7427335a005bb379509a9a9e86a01c44a21e07/packages/core/src/utils/RequestContext.ts#L37-L42
the return type is Promise<void>
, so even modifying the line:
nestjs/src/mikro-orm.common.ts
Line 22 in 4e0bad0
the
UseRequestContext
decorator will be unable to return the original method result.from nestjs.
can this fix be included into a new version in npm?
from nestjs.
Oh right, forgot to release it - I don't have time for this right now but will ship it early next week.
But the method is really a simple one, nothing special in it, so you can just copy the code to your project and use your (fixed) implementation instead.
from nestjs.
no problem, thank you very much @B4nan
from nestjs.
Related Issues (20)
- Error when trying to query an entity from the repository HOT 3
- How can I take some actions after it successfully connects or fails? HOT 1
- Cannot persist an entity with a 1-to-1 reference to another entity HOT 5
- Cannot persist Read-Only association HOT 3
- Cannot get `@UseRequestContext` to work in a REQUEST scoped BullMQ processor HOT 4
- Populating Nested Field returns the wrong number of associated entities HOT 5
- Relations not working in nestjs HOT 6
- Issue when running tests after upgrading to 5.2.2
- Bump version, compatible with MikroORM V6 HOT 6
- Nestjs, mikro-orm and postgres can't generate table automatically HOT 2
- vitest + mikroorm collection error HOT 4
- findByCursor method not working on sqlite HOT 1
- Testing with multiple testing modules in NestJS and Jest leads to an error during metadata discovery HOT 2
- Issues running Mikro-ORM with NestJS on Vercel platform HOT 1
- MikroOrmMiddleware not found in e2e tests
- feat: add Transactional Decorator HOT 1
- How to listen to connection status?
- Nest cannot export a provider/module that is not a part of the currently processed module (MikroOrmCoreModule). Please verify whether the exported MongoMikroORM is available in this particular context.
- Allow specifying .fork() options for Request-Scoped EntityManager in the MikroOrmModule
- Using multiple databases hustle
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nestjs.