title: JHipster : Generate MongoDB entities with JHipster Domain Language (JDL)
body: <p>I'm trying JHipster with a MongoDB database. For my example I would like to store Books. To do that I would like to use the JDL format to be able to generate entities, repositories, services, dtos…</p>
  
  <p>This is my actual JDL file:
  And it works : </p>
  
  <pre><code>entity Book {
      name String required
      date LocalDate required
  }
  
  dto all with mapstruct
  paginate all with pager
  service all with serviceImpl
  </code></pre>
  
  <p>Now, I would like to add the notion that a <code>Book</code> can be written by an <code>Author</code>.</p>
  
  <p>I can add an entity <code>Author</code>:</p>
  
  <pre><code>entity Author {
          firstane String required
          lastname LocalDate required
      }
  </code></pre>
  
  <p>My specific question is: How can I associate an <code>Author</code> and a <code>Book</code>?</p>
  
  <p>The documentation has this example : </p>
  
  <pre><code>relationship OneToMany {
    Author{book} to Book{writer(name) required}
  }
  </code></pre>
  
  <p>But that's not working because NoSQL databases don't support relationships. So, how can I achieve that ?</p>
  
  <p>Thanks.</p>