title: Spring MongoDB Save
body: <p>I'm creating a Spring Boot application and I am using AngularJS on the frontend.</p>
  
  <p>Upon submitting a form with the appropiate parameters, Spring is supposed to use <code>bookRepository.save()</code> method in order to save the provided data in the MongoDB. The problem is, this action gets carried on, but the structure of my model is not respected.</p>
  
  <pre><code>@Document(collection = "books")
  public class Book {
      private String id;
  
      private String title;
  
      private String author;
  
      private String description;
  
      private String cover;
  
      // Getters and setters below.
  }
  </code></pre>
  
  <p>The final outcome after following the above process: instead of having a record following the above structure inserted in MongoDB, I only end up with a field containing <code>_id</code> and <code>_class</code>.</p>
  
  <p>Any ideas as to why is this happening?</p>