title: Hibernate criteria by a list of natural ids
body: <p>I am trying to create hibernate criteria using a list of natural ids. I saw the example here 
  <a href="http://docs.jboss.org/hibernate/core/3.5/reference/en-US/html/querycriteria.html#query-criteria-naturalid" rel="nofollow">http://docs.jboss.org/hibernate/core/3.5/reference/en-US/html/querycriteria.html#query-criteria-naturalid</a> but it only shows an example for querying a single record:</p>
  
  <pre><code>session.createCriteria(User.class)
    .add(Restrictions.naturalId()
      .set("name", "gavin")
      .set("org", "hb"));
  </code></pre>
  
  <p>Is there a better way to make a criteria for a list of natural ids than the example below?</p>
  
  <pre><code>Junction junction = Restrictions.disjunction()
    .add(Restrictions.naturalId()
      .set("name", "gavin")
      .set("org", "hb"))
    .add(Restrictions.naturalId()
      .set("name", "jdoe")
      .set("org", "rh"));         
  session.createCriteria(User.class)
    .add(junction);
  </code></pre>
  
  <p>Thanks.</p>