title: QueryDSL Predicate SetPath.any with multiple conditions
body: <p>I have a simple entity with one to many relationship</p>
  
  <pre><code>@Entity // and other @ stuff
  public class Member {
    @Id
    private Long id;
    private String name;
    private List&lt;Program&gt; programs;
    ...
  }
  
  @Entity
  public class Program {
     @Id
     private Long id;
     private Long programName;
     private ProgramType programType;
     private Long programCost;
     ...
  }
  </code></pre>
  
  <p>Now using QueryDSL, I would like to query 
  'All members enrolled in a program with programType = "FULLTIME" and programCost > $1000'</p>
  
  <p>I used the following predicate</p>
  
  <pre><code>Predicate predicate = QMember.member.programs.any()
      .programType.eq(ProgramType.FULLTIME)
        .and(QMember.member.programs.any().programCost.gt(1000));
  </code></pre>
  
  <p>with JPARepository </p>
  
  <pre><code>memberRepository.findAll(predicate);
  </code></pre>
  
  <p>Now the problem is that the two queries are independent. It returns al members with at least one program of type 'FULLTIME' or at least one program of cost greater than 1000.</p>
  
  <p>Desired result : Return members if he has at least one program that is of type FULLTIME and cost > 1000.</p>