Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.0.0.GA
-
Fix Version/s: None
-
Labels:
-
Environment:All
Description
the "compoundIndex" syntax in mapping config currently doesn't have an option for making a compound index have a uniqueness constraint.
You'd think you could do something like:
static mapping =
{ compoundIndex a:1, b:2, indexAttributes:[unique:true] }But if you do, it simply fails to create the index.
This plugin provides a solution http://grails.org/plugin/mongodb-compound-index-attributes