Skip to content

findOneByFields - new method #112

Open
@RemyMachado

Description

@RemyMachado

I am wondering why isn't there a findOneByFields method, similar to the existing findByFields one.

Currently I'm using this hack:

    async findOneByFields(values) {
        return this.findByFields(values).then((documents) => documents?.[0])
    }

Is there a reason why it's not provided?

Is my wrapping function useless because of how the batching/caching work?

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