title: Jpa ManyToMany relationships doesn't work
body: <p>I have SpringBoot 2.1.3 + MySql 5.7 Database. I'm trying to do a ManyToMany relationship between 2 entities:</p>
  
  <pre><code>@Entity
  @Data
  public class User {
      private String name;
      @ManyToMany(cascade = CascadeType.ALL)
      private List&lt;Hobby&gt; hobbies;
  }
  
  @Entity
  @Data
  public class Hobby {
      private String description;
      @ManyToMany(mappedBy = "hobbies")
      private List&lt;User&gt; users;
  }
  </code></pre>
  
  <p>now if I made a test:</p>
  
  <pre><code>User user = new User();
  user.setName("James");
  user.setHobbies(new ArrayList&lt;&gt;());
  
  Hobby hobby = new Hobby();
  hobby.setDescription("Golf");
  hobby.setUsers(new ArrayList&lt;&gt;());
  
  user.getHobbies.add(hobby);
  hobby.getUsers.add(user);
  
  userRepository.save(user);
  </code></pre>
  
  <p>All three tables are persisted (User table, Hobby table and the mapping one created by jpa) as follows:</p>
  
  <pre><code>USER              USER_HOBBY               HOBBY
  id, name          iduser, idhobby          id, description
  1   James         1        1               1   Golf
  </code></pre>
  
  <p>But if now I call</p>
  
  <pre><code>List&lt;User&gt; us = userRepository.findAll();
  </code></pre>
  
  <p>inside <em>us</em> I don't have any hobby entities.. It said:</p>
  
  <pre><code>com.sun.jdi.InvocationException occurred invoking method.
  </code></pre>
  
  <p>My application.properties with db config:</p>
  
  <pre><code># Connection url for the database "test"
  spring.datasource.url = jdbc:mysql://localhost:3306/test?useSSL=false
  
  # ===============================
  # = JPA / HIBERNATE
  # ===============================
  
  spring.jpa.properties.hibernate.dialect= org.hibernate.dialect.MySQL5InnoDBDialect
  spring.jpa.hibernate.ddl-auto=create-drop
  spring.jpa.show-sql=true
  </code></pre>
  
  <p>I have tried everything following all the examples find by google.
  What's wrong??</p>
  
  <p>Thank you</p>