additional overload of CriteriaBuilder.between()#690
Open
henriquediascampos wants to merge 4 commits intojakartaee:masterfrom
Open
additional overload of CriteriaBuilder.between()#690henriquediascampos wants to merge 4 commits intojakartaee:masterfrom
henriquediascampos wants to merge 4 commits intojakartaee:masterfrom
Conversation
3f423eb to
37f2bb2
Compare
gavinking
reviewed
Nov 23, 2025
gavinking
approved these changes
Nov 23, 2025
Member
gavinking
left a comment
There was a problem hiding this comment.
I have no objection to adding this.
Member
|
@henriquediascampos You need to update the file header as so: |
Member
|
Also probably best to have an issue. |
Author
|
@gavinking If you could help me with a question. |
Member
I can't push to your branch though. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Recently, I noticed the absence of a
Predicatespecification that tests whether a given literal valuevis between two dynamic expressionsxandy.In a real-world scenario, I encountered this need while checking if a specific date fell between two values stored in the database. At the time, I worked around this by combining "greater than" and "less than" conditions to achieve the desired result. However, wouldn't it be much cleaner and less verbose if we could express this condition directly in a clearer way?
This addition introduces a new
betweenmethod that improves query readability and conciseness. I believe this enhancement would make the API more intuitive for developers who encounter similar use cases.(This is my first contribution; please let me know if I missed any steps or if further adjustments are needed. I appreciate your feedback!)