Skip to content

GPMONGODB-359: new indexAtrributes key for compound index not working? #299

@graemerocher

Description

@graemerocher

Original Reporter: eliasisrael
Environment: Mac 10.9.2, GGTS 3.4.0, Java 1.7, Grails 2.3.6
Version: 2.0.0.GA
Migrated From: http://jira.grails.org/browse/GPMONGODB-359

A domain class like this:
{code}
class ServerStream {
ObjectId id

Server server
LinkedAccount stream
String screenName
Boolean fBackfill=false

static mapping = {
    version false
    stream reference: false, index: true, indexAttributes: [unique:true, dropDups:false]
    compoundIndex server :1, stream:1, indexAttributes:[unique:true, dropDups:true]
    writeConcern WriteConcern.SAFE
}

static constraints = {
}

[...]
{code}
Is failing on startup with this error:

{ "serverUsed" : "/127.0.0.1:27017" , "err" : "bad index key pattern { server: 1, stream: 1, indexAttributes: { unique: true, dropDups: true } }"

Is the syntax for indexAttributes on compound indexes fixed in 2.0.0? If so, have I got the syntax wrong?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions