Skip to content

MongoDB driver findBy() method uses unsupported Query Builder #10264

@fmlukaszmatusik

Description

@fmlukaszmatusik

Issue description

MongoDB driver findBy() method uses unsupported Query Builder

Expected Behavior

findBy() method should work as expected in TypeORM 0.3.15+ with MongoDB version 5.

Actual Behavior

Using findBy() method results in this error

TypeORMError: Query Builder is not supported by MongoDB.

Whereas find() works as expected.

Steps to reproduce

Install TypeORM 0.3.15 or above and mongodb version 5. Run any query using getMongoRepository(Entity).findBy()

My Environment

Dependency Version
Operating System macos
Node.js version 18.4.1
Typescript version 5.1.6
TypeORM version 0.3.17

Additional Context

No response

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?

No, I don’t have the time and I’m okay to wait for the community / maintainers to resolve this issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions