Search code examples
mongodbgrailsgrails-orm

Best version of the mongodb gorm plugin for grails 2.2.x?


Will the current MongoDB GORM plugin work on grails 2.2.x versions ? Specifically grails 2.2.3. Just a note, upgrading to grails 2.3 is really not an easy option for this app.


Solution

  • After experimenting with various combinations. I have found that it's the 1.3.3 version of mongodb that worked for my grails version 2.2.3.

    additional notes:

    I also had to use the 1.1.9 versions grails-datastore-core and grails-datastore-simple as the 1.1.8 versions were causing a class def not found for StatelessDatastore.

    I use maven for my build so the final dependencies I added look like this:

    <dependency>
        <groupId>org.grails.plugins</groupId>
        <artifactId>mongodb</artifactId>
        <version>1.3.3</version>
        <scope>compile</scope>
        <type>zip</type>
    </dependency>
    
    <dependency>
        <groupId>org.grails</groupId>
        <artifactId>grails-datastore-core</artifactId>
        <version>1.1.9.RELEASE</version>
        <scope>compile</scope>
    </dependency>
    
    <dependency>
        <groupId>org.grails</groupId>
        <artifactId>grails-datastore-simple</artifactId>
        <version>1.1.9.RELEASE</version>
        <scope>compile</scope>
    </dependency>
    

    Thanks for the replies everyone.