title: Hibernate creates two tables in a many to many relationship
body: <p>This is my <code>Product</code> entity class:</p>
  <pre><code>public class Product extends BaseEntity {
    @Column
    @ManyToMany()
    private List&lt;Customer&gt; customers = new ArrayList&lt;&gt;();
  
    @ManyToOne
    private Supplier supplier;
  } 
  </code></pre>
  <p>And this is my <code>Customer</code> entity class:</p>
  <pre><code>public class Customer extends BaseEntity {
  
    //Enum type to String type in database '_'
    @Enumerated(EnumType.STRING)
    @Column
    private Type type;
  
    @Column
    @ManyToMany(targetEntity = Product.class)
    private List&lt;Product&gt; products = new ArrayList&lt;&gt;();
  }
  </code></pre>
  <p>When I run my Spring boot project, it creates 2 separate tables in my database(Mysql): <strong>product_customer</strong> and <strong>customer_product</strong> but I need only one. What can I do to solve this?</p>