Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixes invalid index key

  • Loading branch information...
commit fed6df5d6251e0b6b048314c7249ab746daf3662 1 parent f21fc29
@literalice authored
View
4 src/groovy/com/monochromeroad/grails/plugins/mongo/cia/MongoDatastore.groovy
@@ -55,9 +55,9 @@ class MongoDatastore extends org.grails.datastore.mapping.mongo.MongoDatastore {
final MongoCollection mappedForm = classMapping.getMappedForm();
if (mappedForm != null) {
for (Map compoundIndex : mappedForm.getCompoundIndices()) {
- if (compoundIndex.indexAttributes) {
+ if (compoundIndex.indexAttributes instanceof Map) {
DBObject options = new BasicDBObject(compoundIndex.indexAttributes as Map)
- compoundIndex.indexAttributes = null
+ compoundIndex.remove("indexAttributes")
DBObject indexDef = new BasicDBObject(compoundIndex);
collection.ensureIndex(indexDef, options);
} else {
Please sign in to comment.
Something went wrong with that request. Please try again.