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

ID order in example #33

Open
WillSquire opened this issue Jul 1, 2020 · 1 comment
Open

ID order in example #33

WillSquire opened this issue Jul 1, 2020 · 1 comment

Comments

@WillSquire
Copy link

WillSquire commented Jul 1, 2020

In the example id: In(ids as string[]) is used to query the database, however I don't believe this guarantees the order of the IDs? Although I could be wrong.

EDIT:
i.e:

const accounts = this.accounts.find({
      id: In(ids as string[]),
    })

return ids.map((id) => accounts.find((n) => n.id === id))

Instead?

@jeromemeichelbeck
Copy link

Yeah you're right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants