title: Morphia/MongoDB: Accessing "embedding" object from an @Embedded object
body: <p>I have a Morphia schema similar to this one:</p>
  
  <pre><code>@Entity
  class BlogEntry {
      @Embedded
      List&lt;BlogComment&gt; comments
  }
  
  @Embedded
  class BlogComment {
      String content
      Long authorId
  }
  </code></pre>
  
  <p>(code above just for illustration)</p>
  
  <p>I'm trying to get a specific BlogComment in order to update it with new content. I have the corresponding BlogEntry object available, and I have the authorId, which let's say for the purposes of this question that these two together are sufficient to uniquely identify the correct BlogComment.</p>
  
  <p>My question is, BlogComment does not explicitly contain a reference to its "parent" BlogEntry object, so how can I write a morphia query to retrieve this BlogComment? Something like:</p>
  
  <pre><code>//fetch the unique comment corresponding to this blog entry and this author ID.
  BlogComment comment = ds.find(BlogComment.class, "blogEntryId =", blogEntry.id)
                          .filter("authorId", authorId)
                          .get(); 
  </code></pre>