title: Morphia - Map single collection data into multiple pojos
body: <p>I have a collection with 40 fields. </p>
  
  <p>I have pojo as follows</p>
  
  <pre><code>@Entity("colName")
  public class Entity1 {
     //Id
     //10 fields - names same as collection columns
     @Embedded
     //Entity2
  }
  </code></pre>
  
  <p>Entity2 class:</p>
  
  <pre><code>@Embedded
  public class Entity2 {
    //20 other fields
  }
  </code></pre>
  
  <p>I query the collection as follows</p>
  
  <pre><code>datastore.createQuery(Entity1.class).disableValidation().filter("fieldFromEntity1", "2227536").asList();
  </code></pre>
  
  <p>But I get always Entity2 reference as null.</p>
  
  <p>I found that Entity2 has to be nested document.</p>
  
  <p>Is there any way to achieve this?</p>
  
  <p><strong>Document:</strong></p>
  
  <pre><code>{
   _id: a|b|c,
   field1: stringValue,
   ....
   field40: intgerValue
  }
  </code></pre>