Skip to content

mongo-java-server's collation doesn't work #224

Description

@gregecho

Hi there,

I'm using testImplementation group: 'de.bwaldvogel', name: 'mongo-java-server', version: '1.44.0' with Springboot 3.1.1. However, I found the lib didn't support collation feature well. Hence, below query with ignoreCase won't work:

    private final Collation collation = Collation.of("en").strength(Collation.ComparisonLevel.secondary());
public Credential findOneByUserNameIgnoreCase(String userName) {

        return mongoTemplate
            .findOne(new Query(Criteria.where(CredentialRepository.USER_NAME_FIELD).is(userName)).collation(collation),
                Credential.class);
    }

Any ideas?
Thank in advance

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions