(Quick Reference)

Purpose

Returns the name of the MongoDB collection used for the current domain class

Examples

println Book.collectionName

Description

The collectionName property allows introspection of the name of the DBCollection object used by a given domain class. Can be used in conjunction with useCollection to switch to different collections and back again.