Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
The plugin provides a functionality to add attributes to MongoDB's compound index for Grails MongoDB plugin.
Groovy
Tree: f21fc29484

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
grails-app
src/groovy/com/monochromeroad/grails/plugins/mongo/cia
wrapper
.gitattributes
.gitignore
MongodbCompoundIndexAttributesGrailsPlugin.groovy
README.md
application.properties
grailsw
grailsw.bat

README.md

MongoDB Compound Index Attributes Plugin for Grails

Install

//Build.groovy
grails.project.dependency.resolution = {
    // ...

    repositories {
        // ...

        // For the plugin
        mavenRepo "http://repository-monochromeroad.forge.cloudbees.com/release"
    }

    // ...
    plugins {
        // ...

        compile ":mongodb:1.0.0.GA"
        compile ":mongodb-compound-index-attributes:1.0"
    }
}

Usage

// Domain Class
class Book {

    static mapWith = "mongo"

    static mapping = {
        compoundIndex contributor: 1, name: 1, indexAttributes: [name: "contributorUniqueName", unique: true]
    }

}
Something went wrong with that request. Please try again.