title: Spring Data MongoDB: how to implement "entity relationships"?
body: <p>The title of this question is quite contradictory since I'm trying to implement relations in a non-relational database... :)</p>
  
  <p>But what I mean is how to <strong>define associations between entities</strong> in application model classes working with MongoDB.</p>
  
  <p>Working with JPA I often use <code>@ManyToMany</code> or <code>@OneToMany</code> annotations to define relationships between objects. Is there something similar in Spring Data MongoDB?</p>
  
  <p>Studying MongoDB I realized that there are two possible approaches to the association: <strong>References</strong> and <strong>Embedded Data</strong>.</p>
  
  <p>Which one is used by Spring Data? Is it possible to configure the association mode?</p>