title: Using QueryDSL Projections.bean for Nested Classes
body: <p>I'm using QueryDSL to map my queries to my Beans using this:</p>
  
  <pre><code>QAmbiente qitem=new QAmbiente("x");
  SQLTemplates template = new MySQLTemplates(); // SQL-dialect
  Configuration configuration = new Configuration(template); 
  SQLQuery query = new SQLQuery(conn, configuration);
  List&lt;Ambiente&gt; items = query.from(qitem).list(Projections.fields(Ambiente.class, qitem.idEmpresa));
  </code></pre>
  
  <p>My problem is that i have nested classes for primary keys,  like this:</p>
  
  <pre><code>@EmbeddedId
  protected AmbientePK ambientePK;
  </code></pre>
  
  <p>Then when i try to execute above code, an error is thrown:</p>
  
  <pre><code>The bean of type: br.com.fitsoft.cnfe.model.domain.Ambiente has no property called: idEmpresa
  </code></pre>
  
  <p>The problem occurs only when i put a field that is part of my primary key.</p>
  
  <p>Can anyone help me please?
  Thanks </p>