(Quick Reference)

Purpose

Returns the MongoDB collection used for the current domain class

Examples

def bookBson = Book.collection.find().first()

Description

The collection property allows access to the underlying MongoDB MongoCollection object, thus allowing direct access to the low-level MongoDB driver.