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

default collation doesn't work #111

Open
RemyMachado opened this issue Oct 5, 2022 · 0 comments
Open

default collation doesn't work #111

RemyMachado opened this issue Oct 5, 2022 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@RemyMachado
Copy link

I have the following collation on my collection:

 schemaOptions: {
            collection: 'users',
            collation: {
                locale: 'en',
                strength: 2,
            },
},

It's working correctly when I directly use the model queries, but it fails when I use the methods provided by this library.

With the given collection:

[
    {
        "username": "aaaa"
    }
]

model query:

this.model.findOne({ username: 'AAaa' })  // FINDS the 'aaaa' username

apollo-datasource-mongodb:

this.findByFields({ username: 'AAaa' }).then((documents) => documents?.[0])  // does NOT find the 'aaaa' username
@lorensr lorensr added bug Something isn't working help wanted Extra attention is needed labels Oct 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants