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
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/main/asciidoc/reference/mongo-repositories.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,10 @@ lower / upper bounds (`$gt` / `$gte` & `$lt` / `$lte`) according to `Range`
| `Exists`
| `findByLocationExists(boolean exists)`
| `{"location" : {"$exists" : exists }}`

| `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.

|===

NOTE: If the property criterion compares a document, the order of the fields and exact equality in the document matters.
Expand Down