Skip to content

Commit e8aa876

Browse files
committed
fix: globalPredicate not work when where is null
1 parent 5f5c592 commit e8aa876

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/kotlin/team/yi/rsql/querydsl/QuerydslRsql.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class QuerydslRsql<E> private constructor(builder: Builder<E>) {
8787
@Throws(RsqlException::class)
8888
fun buildPredicate(): Predicate? {
8989
entityClass.let {
90-
if (where.isNullOrBlank()) return null
90+
if (where.isNullOrBlank()) return globalPredicate
9191

9292
val rootNode = RSQLParser(RsqlUtil.getOperators(rsqlConfig.operators)).parse(where)
9393
val predicate = rootNode.accept(PredicateBuilderVisitor(it, predicateBuilder))

0 commit comments

Comments
 (0)