Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't custom filter on ObjectId type fields #299

Open
nathanielrindlaub opened this issue Jan 17, 2025 · 0 comments
Open

Can't custom filter on ObjectId type fields #299

nathanielrindlaub opened this issue Jan 17, 2025 · 0 comments
Labels
bug Something isn't working data filtering

Comments

@nathanielrindlaub
Copy link
Member

nathanielrindlaub commented Jan 17, 2025

If you try to pass in a custom filter that queries on a field of type ObjectId (e.g. Image.tags or Image.deploymentId), for example:

{ tags: ObjectId("67881e193e5bde2a2b041d8d") }

We get the following error in the the queryImagesByFilter() method: BSONVersionError: Unsupported BSON version, bson types must be from bson 6.x.x. The error seems to be related to mongo-cursor-pagination and mongo-query-parser not using bson v6?

npm list bson

├─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│   └── [email protected] deduped
└─┬ [email protected]
  ├── [email protected]
  └─┬ [email protected]
    └── [email protected]
@nathanielrindlaub nathanielrindlaub added bug Something isn't working data filtering labels Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working data filtering
Projects
None yet
Development

No branches or pull requests

1 participant