title: How to set uniqueness at DB level for a one-to-many association?
body: <p>My problem is simple but I could not find any GORM syntax for this.</p>
  
  <p>Consider the following class:</p>
  
  <pre><code>class Article {
    String text
  
    static hasMany = [tags: String]
  
    static constraints= {
      tags(unique: true) //NOT WORKING
    }
  
  }
  </code></pre>
  
  <p>I want to have <strong>one unique tag name per article</strong> defined in my constraints but I cannot make it with the above syntax.
  Clearly I need in DB schema something like:</p>
  
  <pre><code>create table article_tags (article_id bigint, tags_string varchar(255), unique (article_id , tags_string))
  </code></pre>
  
  <p>How can I do that?</p>
  
  <p>PS: I am also stuck for setting constraints on tag minimum and maximum size</p>