Skip to content

Update list of supported query method keywords. #3950

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

Closed

Conversation

mihailcornescu
Copy link
Contributor

@mihailcornescu mihailcornescu commented Jan 25, 2022

Fix for #3916.

  • included @IgnoreCase to mongodb.repositories.queries query table documentation.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 25, 2022
@mihailcornescu mihailcornescu changed the title Issue/3916 Update list of supported query method keywords. Jan 26, 2022

| `IgnoreCase`
| `findByUsernameIgnoreCase(String username)`
| `{"username" : {"$strcasecmp" : username }}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$strcasecmp is an aggregation operator. The MongoQueryCreator uses a Pattern that translates to { $regex : '^username$', '$options' : 'i' }.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the feedback. I will make the changes.

Copy link
Contributor Author

@mihailcornescu mihailcornescu Jan 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @christophstrobl. I have made the changes. You were right, that regex is used in the code.
Is it ok to use double quotes instead of single quotes? I noticed that strings are used and even the i from the options is a String.

christophstrobl pushed a commit that referenced this pull request Feb 2, 2022
Update reference documentaion and add missing IgnoreCase keyword.

Closes: #3916
Original Pull Request: #3950
christophstrobl pushed a commit that referenced this pull request Feb 2, 2022
Update reference documentaion and add missing IgnoreCase keyword.

Closes: #3916
Original Pull Request: #3950
christophstrobl pushed a commit that referenced this pull request Feb 2, 2022
Update reference documentaion and add missing IgnoreCase keyword.

Closes: #3916
Original Pull Request: #3950
@christophstrobl
Copy link
Member

Thanks for the contribution @mihailcornescu! Merged to main development line and back ported to 3.3.x and 3.2.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants