(Quick Reference)

getCollection

Purpose

Returns the DBCollection instance for the given domain class.

Examples

assert (Book.collection instanceof DBCollection)
// insert data into collection
Project.collection.insert(new BasicDBObject('name', 'Project MongoDB'))