fetch Join With Predicates
fun <T : Any, R> KProperty1<T, R>.fetchJoinWithPredicates(joinType: JoinType = JoinType.INNER, predicateBuilder: (From<T, R>, CriteriaBuilder) -> List<Predicate>): Specification<T>(source)
Creates a Specification that performs a fetch and applies a list of Predicates by ANDing them to the fetch-joined entity.
Receiver
T – the type of the root entity.
R – the type of the fetch-joined entity.
Return
A Specification that performs the fetch-join and applies the predicates.
Parameters
join Type
The type of join to perform (defaults to JoinType.INNER).
predicate Builder
A lambda that receives the fetch-joined entity path and criteria builder, and returns a predicate.