Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

findOneByFields - new method #112

Open
@RemyMachado

Description

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

        AltStyle によって変換されたページ (->オリジナル) /