[hibernate7] hibernate7 like regexp#19246
Open
sk1418 wants to merge 4 commits into
Open
Conversation
theangrydev
requested changes
Jun 23, 2026
Comment on lines
+11
to
+15
| @Query("select m from Message m where m.content like regexp :pattern") | ||
| List<Message> findByContentMatchingRegex(@Param("pattern") String pattern); | ||
|
|
||
| @Query("select m from Message m where m.content not like regexp :pattern") | ||
| List<Message> findByContentNotMatchingRegex(@Param("pattern") String pattern); |
Collaborator
There was a problem hiding this comment.
Was it intentional to not uppercase the keywords SELECT, FROM, ...?
I can't remember if we have any guideline on this for Java, I think we used to for SQL articles at least
No big deal either way on my side just checking if you had considered it
Contributor
Author
There was a problem hiding this comment.
In the hiberate doc and examples, they use lowercase keywords. They do mention keywords are case-insensitive, though.
So, if it's okay with you, I would have them in lowercase to align with the Hibernate doc. E.g., "... like regexp operator..." instead of "LIKE REGEXP operator"
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.
No description provided.