title: Naming a multi-column constraint using JPA
body: <p>The <code>name</code> attribute of <code>@UniqueConstraint</code> seems to have no effect.</p>
  
  <pre><code>@Entity
  @Table(name = "TAG", uniqueConstraints = @UniqueConstraint(columnNames = {
          "TAG_NAME", "USERS_ID" }, name="UQ_TAG_USER"))
  public class Tag extends BaseEntity {
  
  }
  </code></pre>
  
  <p>I'm usning <code>SQL Server 2008</code>, <code>JPA 2.0</code> with <code>Hibernate 3.6</code>.</p>
  
  <p>On the DB side an index, <code>UQ__TAG__6EF57B66</code> is created instead of <code>UQ_TAG_USER</code>.</p>
  
  <p>What am I missing? is there no way to enforce a given name from java side? and one must resort to editing schema files? we are a small shop without a DBA and I try to make do as much as I can by the help of hibernate schema facilities.</p>