Created
November 20, 2022 08:02
-
-
Save Abhi-Codes/1d842875be9e7f837685cf8e522a5fc9 to your computer and use it in GitHub Desktop.
Use Custom SQL function in QueryDSL
This file contains 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
QRoles userRolesPath = QRoles.roles1; | |
BooleanExpression exp = Expressions | |
.booleanTemplate("json_contains_key({0}, {1})", userRolesPath.roles, Expressions.constant(role)) | |
.isTrue(); | |
Iterable<Roles> lr = rr.findAll(exp); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment