SpringSource announces today Grails Object Relational Mapping for MongoDB!
http://blog.springsource.com/2010/11/15/yet-another-flavour-of-gorm-mongodb/
For the people unfamiliar with MongoDB, it is a document oriented database that bridges the gap between key-value stores (which are fast and highly scalable) and traditional RDBMS systems (which provide rich queries and deep functionality).
We’ve been using MongoDB for a while already and have had a few discussions going around whether that’s the right choice, since we use Grails and develop in Groovy, and it appeared that the MongoDB Grails plug-in was immature and not recommended for production, on the other hand we could create the classes Grails domain classes and use [annotate] morphia to map Java/Groovy objects to/from MongoDB, but that would mean more work in the last stages of the sprint, which would put the sprint under a risk.
So, it appears that SpringSource have hidden microphones in our office, and the day we were discussing this issue, they came up with this nice news. [ In fairness to one of our colleagues, I need to tell that he suggested to wait for an update from SpringSource, which actually we are discussing right now ]
Anyways, let’s see what GORM for MongoDB offers:
- Full support for CRUD operations
user.save(), user.delete()… - Dynamic finders
User.findAllByHeightGreaterThan(173) - Complex Criteria queries
def result = User.withCriteria{
like('name','F%')
gt('age',18)
} - Reusable Named Queries
Although many2many relationships are missing, it is great great step forward, and I am sure people using Grails together with MongoDB will appreciate a lot! Well done Guys.
All we need to do now, is to
- remove the grails hibernate plug-in (if installed)
- create the classes in the Grails domain class folder
Check the manual ( http://grails.github.com/inconsequential/mongo/manual/index.html ) for more information on the new arrival! And share comments with us if you use MongoDB with Grails!

Pingback: Narek Alaverdyan
Pingback: baselogic
Pingback: Enterprise Java
Pingback: baselogic
Pingback: Enterprise Java
Pingback: baselogic
Pingback: Tweets that mention GORM for MongoDB – Impressive | ReadMe -- Topsy.com
Pingback: Enterprise Java
Pingback: Grails/GORM for MongoDB