blob: 2ff375a5bcdf4c5468f5655a67c72b508afb9b3e [file] [log] [blame]
===== Purpose
Returns the name of the MongoDB https://api.mongodb.org/java/current/com/mongodb/DBCollection.html[collection] used for the current domain class
===== Examples
[source,java]
----
println Book.collectionName
----
===== Description
The `collectionName` property allows introspection of the name of the https://api.mongodb.org/java/current/com/mongodb/DBCollection.html[DBCollection] object used by a given domain class. Can be used in conjunction with `useCollection` to switch to different collections and back again.