title: Use fewer columns on SQL query through Hibernate Projections on Entity with ManyToOne relation
body: <p>I'm trying to build a smaller SQL, to avoid the "select * from A" that is being build by default for hibernate Criteria.</p>
  
  <p>If I use simple fields (no relation), through "Transformers", I have can manage to have this SQL:</p>
  
  <pre><code>select description, weight from Dog;
  </code></pre>
  
  <p>Hi, I have this Entity:</p>
  
  <pre><code>@Entity
  public class Dog
  {
     Long id;
     String description;
     Double weight;
     @ManyToOne(fetch = FetchType.LAZY)
     @JoinColumn(name = "person_id", nullable = false)
     Person owner;
  }
  
  @Entity
  public class Person
  {
     Long id;
     String name;
     Double height;
     Date birthDate;
  }
  </code></pre>
  
  <p>My goal is to have this:</p>
  
  <pre><code>select description, weight, owner.name from Dog
  </code></pre>
  
  <p>I tried this with with Criteria (and subcriteria):</p>
  
  <pre><code>Criteria dogCriteria = sess.createCriteria(Dog.class);
  ProjectionList proList = Projections.projectionList();
  proList.add(Projections.property("description"), description);
  proList.add(Projections.property("weight"), weigth);
  dogCriteria.setProjection(proList);
  
  Criteria personCriteria = dogCriteria.createCriteria("owner");
  ProjectionList ownerProList = Projections.projectionList();
  ownerProList.add(Projections.property("name"), description);    
  dogCriteria.setProjection(ownerProList);  //After this line,  debugger shows that the
                                            //projection on dogCriteria gets overriden
                                            //and the query fails, because "name" is
                                            //not a field of Dog entity.
  </code></pre>
  
  <p>How should I use Projections, to get a smaller SQL, less columns ?
  Thanks in advance.</p>