title: datamapper multi-field unique index
body: <p>In Datamapper, how would one specify the the combination of two fields must be unique. For example categories must have unique names within a domain:</p>
  
  <pre><code>class Category
    include DataMapper.resource
    property :name, String, :index=&gt;true #must be unique for a given domain
  
    belongs_to :domain
  end
  </code></pre>