title: Hibernate Restrictions.in vs. Disjunction
body: <p>Other than less code, what is the difference between the following two approaches to building an IN clause using the Hibernate Criteria API?  Are there performance concerns?  Is there some logic in the retrieval I am missing?  They both seem to perform the same as far as rows returned.</p>
  
  <pre><code>Disjunction disj = Restrictions.disjunction();
  for (String value : stringArray) {
       disj.add(Restrictions.eq("code", value));
  }
  where.add(disj);
  </code></pre>
  
  <p>VS.</p>
  
  <pre><code>Restrictions.in("code", stringArray);
  </code></pre>
  
  <p>The reason I ask is because I am refactoring legacy code where the former exists, but I was expecting the latter.  If they are both the same, I am going to leave the legacy code alone.</p>