Skip to content

Proper way to pass ObjectId in findByFields() #65

Closed
@Daguima-dag

Description

@Daguima-dag

Hi, I'm trying to query for a field that takes ObjectId as value. I've tried the following but to no avail:

const ObjectID = require('mongodb').ObjectID

and then

return this.findByFields({album_id: new ObjectID('someidhere')})

Are ObjectIds supported in findByFields()? How should I pass them?

thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions