Skip to content

Commit

Permalink
Document that fluent findBy(…) queries must return a result.
Browse files Browse the repository at this point in the history
Closes #3237
  • Loading branch information
mp911de committed Jan 22, 2025
1 parent 613ee5f commit f86ee7f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ public interface QuerydslPredicateExecutor<T> {
/**
* Returns entities matching the given {@link Predicate} applying the {@link Function queryFunction} that defines the
* query and its result type.
* <p>
* The query object used with {@code queryFunction} is only valid inside the {@code findBy(…)} method call. This
* requires the query function to return a query result and not the {@link FluentQuery} object itself to ensure the
* query is executed inside the {@code findBy(…)} method.
*
* @param predicate must not be {@literal null}.
* @param queryFunction the query function defining projection, sorting, and the result type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ public interface ReactiveQuerydslPredicateExecutor<T> {
/**
* Returns entities matching the given {@link Predicate} applying the {@link Function queryFunction} that defines the
* query and its result type.
* <p>
* The query object used with {@code queryFunction} is only valid inside the {@code findBy(…)} method call. This
* requires the query function to return a query result and not the {@link FluentQuery} object itself to ensure the
* query is executed inside the {@code findBy(…)} method.
*
* @param predicate must not be {@literal null}.
* @param queryFunction the query function defining projection, sorting, and the result type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ public interface QueryByExampleExecutor<T> {
/**
* Returns entities matching the given {@link Example} applying the {@link Function queryFunction} that defines the
* query and its result type.
* <p>
* The query object used with {@code queryFunction} is only valid inside the {@code findBy(…)} method call. This
* requires the query function to return a query result and not the {@link FluentQuery} object itself to ensure the
* query is executed inside the {@code findBy(…)} method.
*
* @param example must not be {@literal null}.
* @param queryFunction the query function defining projection, sorting, and the result type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ public interface ReactiveQueryByExampleExecutor<T> {
/**
* Returns entities matching the given {@link Example} applying the {@link Function queryFunction} that defines the
* query and its result type.
* <p>
* The query object used with {@code queryFunction} is only valid inside the {@code findBy(…)} method call. This
* requires the query function to return a query result and not the {@link FluentQuery} object itself to ensure the
* query is executed inside the {@code findBy(…)} method.
*
* @param example must not be {@literal null}.
* @param queryFunction the query function defining projection, sorting, and the result type
Expand Down

0 comments on commit f86ee7f

Please sign in to comment.