title: Hibernate - Select OneColumn and get result as list
body: <p>Lets say I have this table:</p>
  
  <pre><code>TableName: order;
  
  Columns: id (numeric - primary key);
  
  Data: 1, 2, 3, 5, 7;
  </code></pre>
  
  <p>I have a list of <code>id</code>s and I want to see which of them are in table <code>order</code>.</p>
  
  <p>I execute this query direct in mysql:</p>
  
  <pre><code>SELECT id FROM orders WHERE id IN (1, 3, 11, 17);
  </code></pre>
  
  <p>How I can execute this query with Hibernate and get as result <code>List&lt;Integer&gt;</code> which contain [1, 3](based on example).</p>