title: Criteria join with projection
body: <p>I am going to create this SQL query's <code>Criteria</code> equivalent:</p>
  
  <p>SQL:</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT
    orders.id,
    book.title,
    orderitem.quantity
  
    FROM orderitem
      INNER JOIN book ON book.id = orderitem.book_id
      INNER JOIN orders ON orders.id = orderitem.orders_id
  
  WHERE user_id = 1
  </code></pre>
  
  <p>Here is my <code>Criteria</code> query:</p>
  
  <pre><code>Criteria c = getSession().createCriteria(OrderItem.class, "oi");
  c.setProjection(Projections.property("quantity"));
  
  c.createAlias("oi.book", "book");
  c.setProjection(Projections.property("title"));
  c.createAlias("oi.orders", "or");
  c.setProjection(Projections.property("id"));
  c.createAlias("or.user", "usr");
  
  c.add(Restrictions.eq("usr.id", "1"));
  return c.list();
  </code></pre>
  
  <p>It has no exception, but it displays just <code>Orders.id</code> column:</p>
  
  <pre><code>[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 22]
  </code></pre>