-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Closed
Labels
Description
Issue description
MongoDB aggregation cursor return type cannot be modified
Expected Behavior
Aggregate method's generic parameter allows modifying the expected return type of the call.
Actual Behavior
The generic is redundant and the cursor will always hold the entity type instead of allow parameterization.
This is clear from the type signature.
Steps to reproduce
Attempt to perform an aggregation that returns anything other than the entities and observe the type mismatch.
My Environment
| Dependency | Version |
|---|---|
| Operating System | MacOS |
| Node.js version | 18.19.0 |
| Typescript version | 5.3.3 |
| TypeORM version | 0.3.19 |
Additional Context
Happy to change the return type in the signature, but I need guidance on what the process is and whether I need to modify anything else.
Relevant Database Driver(s)
- aurora-mysql
- aurora-postgres
- better-sqlite3
- cockroachdb
- cordova
- expo
- mongodb
- mysql
- nativescript
- oracle
- postgres
- react-native
- sap
- spanner
- sqlite
- sqlite-abstract
- sqljs
- sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
Yes, I have the time, but I don't know how to start. I would need guidance.
alberteddu, john-perspective, cfey and Vasilic-Maxim