title: Hibernate's @ManyToMany making index with unique constraint
body: <p>I have a @ManyToMany relationship annotation that's generating an undesired index with a unique constraint. I'm not sure how to prevent this. Here's what my annotation looks like:</p>
  
  <pre><code>@ManyToMany(fetch = FetchType.LAZY)
  @JoinTable(name = "ab_join_table",
          joinColumns = @JoinColumn(name = "entity_a_uid", referencedColumnName = "uid", insertable = false, updatable = false, unique = false),
          inverseJoinColumns = @JoinColumn(name ="entity_b_uid", referencedColumnName = "uid", insertable = false, updatable = false, unique = false),
          foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT))
  @org.hibernate.annotations.ForeignKey(name = "none", inverseName = "none")
  private Set&lt;EntityB&gt; entities = new HashSet&lt;&gt;();
  </code></pre>
  
  <p>Basically, I have a table EntityA and EntityB that have a many-to-many relationship and use a join table to bridge the relationship. Nothing special. The problem is, the UID isn't desired to be unique and I don't want this unique constraint added! It's added as an index</p>
  
  <pre><code>"uk_5u10jim5rbm0dggygeebnr6ve" UNIQUE CONSTRAINT, btree (uid)
  </code></pre>
  
  <p>How do I prevent this?</p>
  
  <p>My column (that the index is created on undesireably) is annotated as follows:</p>
  
  <pre><code>@Column(name="uid", nullable = false, unique = false)
  private String uid;
  </code></pre>