Skip to content

[hibernate7] hibernate7 like regexp#19246

Open
sk1418 wants to merge 4 commits into
eugenp:masterfrom
sk1418:hibernate7
Open

[hibernate7] hibernate7 like regexp#19246
sk1418 wants to merge 4 commits into
eugenp:masterfrom
sk1418:hibernate7

Conversation

@sk1418

@sk1418 sk1418 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

No description provided.

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);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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"

Comment thread persistence-modules/hibernate7/pom.xml
Comment thread persistence-modules/hibernate7/pom.xml Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants