Read operations on Mongo V4 driver does not work with TypeORM.
roku-on-it opened this issue · comments
I'm submitting a...
[ ] Regression
[ ] Bug report
[ ] Feature request
[X] Documentation issue or request
[ ] Support request
Current behavior
Trying to read MongoDB database using TypeORM's BaseEntity.find()
throws error Cannot read 'prototype' of undefined
Expected behavior
To get an array of objects/models
Minimal reproduction of the problem with instructions
- Insert data into database using TypeORM BaseEntity methods,
- Try to get read using both Mongo connection manager and TypeORM's BaseEntity class method
.find()
What is the motivation / use case for changing the behavior?
Downgrading the TypeORM version to below v4 (3.x.x) will fix the issue until TypeORM supports the version 4 of mongo driver.
Environment
Nest version: 7.6.16
For Tooling issues:
- Node version: 14.16.1
- Platform: Linux (Arch)
Others:
IDE: WebStorm
Package Manager: npm
Additional: Inserting data using BaseEntity.create().save()
works fine but read ops does not work such as BaseEntity.find()
Please, report this issue in the typeorm repository.