title: where IN clause - multi column (querydsl)
body: <p>I have three integer values of two pairs.<br>
  I would like to use this as a list of IN in the WHERE clause.</p>
  
  <blockquote>
    <p>(2019, 5) (2019, 6) (2019, 7)<br></p>
  </blockquote>
  
  <p>I want to use the above two-pair list in a query like this:</p>
  
  <pre><code>SELECT
      *
  FROM
      WEEK_REPORT A
  WHERE
      A.user_id IN ('test2','test5' ) AND
      (A.year, A.week_no) IN ((2019,4),(2019,5),(2019,6));
  </code></pre>
  
  <p>To that end, I wrote the source as follows:</p>
  
  <pre><code>// lastYear=2019, lastWeekNo=4
  Tuple t = JPAExpressions.select(Expressions.constant(lastYear), Expressions.constant(lastWeekNo))
      .from(weekReport)
      .fetchOne();
  
  // currentYear=2019, currentWeekNo=5        
  Tuple t2 = JPAExpressions.select(Expressions.constant(currentYear), Expressions.constant(currentWeekNo))
      .from(weekReport)
      .fetchOne();
  
  // nextYear=2019, nextWeekNo=4
  Tuple t3 = JPAExpressions.select(Expressions.constant(nextYear), Expressions.constant(nextWeekNo))
      .from(weekReport)
      .fetchOne();
  
  return queryFactory
      .select(weekReport)
      .from(weekReport)
      .where(weekReport.user.eq(user)
          .and(Expressions.list(weekReport.year, weekReport.weekNo).in(t, t2, t3)))
      .fetch();
  </code></pre>
  
  <p>However, the correct result is not output and an error occurs.</p>
  
  <pre><code>java.lang.UnsupportedOperationException: null
      at com.querydsl.jpa.JPASubQuery.fetchOne(JPASubQuery.java:66) ~[querydsl-jpa-4.1.4.jar:na]
  </code></pre>
  
  <p>I looked it up in the official document but it does not come out.<br>
  Is there a way? <br> </p>
  
  <p>Thank you.</p>