title: QueryDSL Generated classes not able to access second level elements for querying
body: <p>I am using QueryDSL with Spring Data JPA in my Java Project and have Generated files using QueryDSL maven plugin to use the QueryDSL Model classes generated by it. This works great when i use it for one level nested objects, however if i try to access the 2nd level access objects it gives a NullPointerException saving the 2nd level model object is not initialized. </p>
  
  <p>Would appreciate some help.</p>
  
  <p>I am getting a NullPointerException in 3rd line qmachine.vendor is null.</p>
  
  <pre><code>QTransaction qtransaction = QTransaction.transaction;
  QMachine qmachine = qtransaction.machine;
  BooleanExpression vendorexp = qmachine.vendor.vendor.eq(machineType);
  </code></pre>
  
  <p>My Mapping classes are below:
  Transaction</p>
  
  <pre><code>@Entity
  @Table(name = "dsdsd")
  public class Transaction extends AbstractPersistable&lt;Long&gt; {
  
      private static final long serialVersionUID = 1L;
  
      @ManyToOne
      @JoinColumn(name = "machine_id")
      private Machine machine;
  
  }
  </code></pre>
  
  <p>And the Machine class is :</p>
  
  <pre><code>@Entity
  @Table(name="machine")
  public class Machine extends AbstractPersistable&lt;Long&gt; {
  
      private static final long serialVersionUID = 1L;
  
      @ManyToOne
      @JoinColumn(name="vendor_id")
      private Vendor vendor;
  }
  </code></pre>
  
  <p>and the Vendor class is </p>
  
  <pre><code>@Entity
  @Table(name="vendors")
  public class Vendor extends AbstractPersistable&lt;Long&gt; {
  
      private static final long serialVersionUID = 1L;
  
      @Column(name="vendor")
      @Enumerated(EnumType.STRING)
      private VendorType vendor;
  
  }
  </code></pre>
  
  <p>I have ommitted the getters and setters intentionally.</p>