small fix
This commit is contained in:
parent
46dccbfbdb
commit
dd7007128b
|
@ -14,7 +14,6 @@ import gr.cite.tools.data.query.QueryBase;
|
|||
import gr.cite.tools.data.query.QueryContext;
|
||||
import jakarta.persistence.criteria.CriteriaBuilder;
|
||||
import jakarta.persistence.criteria.Predicate;
|
||||
import jakarta.persistence.criteria.Subquery;
|
||||
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
@ -168,9 +167,8 @@ public class TenantUserQuery extends QueryBase<TenantUserEntity> {
|
|||
predicates.add(inClause);
|
||||
}
|
||||
if (this.userQuery != null) {
|
||||
Subquery<UserEntity> subQuery = queryContext.Query.subquery(this.userQuery.entityClass());
|
||||
this.applySubQuery(this.userQuery, queryContext.CriteriaBuilder, subQuery);
|
||||
predicates.add(queryContext.CriteriaBuilder.in(queryContext.Root.get(TenantUserEntity._userId)).value(subQuery));
|
||||
QueryContext<UserEntity, UUID> subQuery = this.applySubQuery(this.userQuery, queryContext, UUID.class, root -> root.get(TenantUserEntity._userId));
|
||||
predicates.add(queryContext.CriteriaBuilder.in(queryContext.Root.get(TenantUserEntity._userId)).value(subQuery.Query));
|
||||
}
|
||||
if (predicates.size() > 0) {
|
||||
Predicate[] predicatesArray = predicates.toArray(new Predicate[0]);
|
||||
|
|
Loading…
Reference in New Issue