title: Spring JPA: Insert data in a @JoinTable
body: <p>I am working with Spring Boot JPA. I have a model for Authors and Books: </p>
  
  <p>In Author.java</p>
  
  <pre><code>@ManyToMany
  @JsonIgnore
  @JoinTable(
          name = "authors_write",
          joinColumns = @JoinColumn(name = "author_id"),
          inverseJoinColumns = @JoinColumn(name = "book_id"))
  Set&lt;Book&gt; works;
  </code></pre>
  
  <p>Book.java</p>
  
  <p>In Book.java</p>
  
  <pre><code>@ManyToMany(mappedBy = "works")
  @EqualsAndHashCode.Exclude
  Set&lt;Author&gt; authors;
  </code></pre>
  
  <p>and when inserting (via postman for example) data into Book table with an Author Object entries do not get updated. </p>
  
  <p>How do I insert data into authors_write when posting into Book table?</p>