interface MongoSettings extends org.grails.datastore.mapping.config.Settings
Additional settings for MongoDB
| Modifiers | Name | Description |
|---|---|---|
static java.lang.String |
DEFAULT_DATABASE_NAME |
The default database name if none is specified |
static java.lang.String |
PREFIX |
The prefix |
static java.lang.String |
SETTING_BUILD_INDEXES |
Whether GORM creates and reconciles the indexes declared in domain class mapping blocks by itself when the datastore starts. |
static java.lang.String |
SETTING_BUILD_INDEXES_ASYNC |
Whether index builds run on a background thread rather than blocking the thread that starts
them: the one GORM runs when the datastore starts, and any the application starts with
MongoDatastore.buildIndex(), including with SETTING_BUILD_INDEXES off.
|
static java.lang.String |
SETTING_CODECS |
All MongoDB codecs |
static java.lang.String |
SETTING_CONNECTIONS |
All MongoDB connections |
static java.lang.String |
SETTING_CONNECTION_STRING |
The connection string |
static java.lang.String |
SETTING_DATABASE_NAME |
The database name |
static java.lang.String |
SETTING_DECIMAL_TYPE |
Whether to use the decimal type |
static java.lang.String |
SETTING_DEFAULT_MAPPING |
The default mapping |
static java.lang.String |
SETTING_ENGINE |
Selects the persistence engine. |
static java.lang.String |
SETTING_HOST |
The host |
static java.lang.String |
SETTING_OPTIONS |
The client options |
static java.lang.String |
SETTING_PASSWORD |
The password |
static java.lang.String |
SETTING_PORT |
The port |
static java.lang.String |
SETTING_STATELESS |
|
static java.lang.String |
SETTING_STRING_IDS_DEFAULT_STORED_AS |
Global default storage type for String id fields when no per-domain
id storedAs: ... mapping is declared. |
static java.lang.String |
SETTING_URL |
The URL |
static java.lang.String |
SETTING_USERNAME |
The username |
| Fields inherited from class | Fields |
|---|---|
interface org.grails.datastore.mapping.config.Settings |
PREFIX, SETTING_AUTO_FLUSH, SETTING_FLUSH_MODE, SETTING_FAIL_ON_ERROR, SETTING_MARK_DIRTY, SETTING_DEFAULT_MAPPING, SETTING_DEFAULT_CONSTRAINTS, SETTING_CUSTOM_TYPES, SETTING_MULTI_TENANCY_MODE, SETTING_MULTI_TENANT_RESOLVER_CLASS, SETTING_MULTI_TENANT_RESOLVER, SETTING_DATASOURCES, SETTING_DATASOURCE, SETTING_DB_CREATE, SETTING_AUTO_TIMESTAMP_INSERT_OVERWRITE, SETTING_AUTO_TIMESTAMP_CACHE_ANNOTATIONS |
The default database name if none is specified
The prefix
Whether GORM creates and reconciles the indexes declared in domain class mapping blocks by
itself when the datastore starts. Defaults to true.
Set to false to leave the indexes on the server exactly as they are, which is
useful when deploying against live data where index changes are applied separately by a
DBA or a migration step rather than by the application on startup. The application can still
build them when it chooses with MongoDatastore.buildIndex().
Whether index builds run on a background thread rather than blocking the thread that starts
them: the one GORM runs when the datastore starts, and any the application starts with
MongoDatastore.buildIndex(), including with SETTING_BUILD_INDEXES off.
Defaults to false, which is the historical behavior: startup waits for MongoDB to
finish building every declared index.
All MongoDB codecs
All MongoDB connections
The connection string
The database name
Whether to use the decimal type
The default mapping
Selects the persistence engine. 'codec' is the default and the recommended
value; 'mapping' remains available for compatibility but is deprecated.
The host
The client options
The password
The port
Global default storage type for String id fields when no per-domain
id storedAs: ... mapping is declared. Accepted values are the names (or hex
aliases) 'objectid' (the default) and 'string'.
Every domain that declares String id without an explicit storedAs
persists _id as a BSON ObjectId, while keeping the String ergonomics
in application code. Domains that use natural string keys (slug, email, UUID) should
opt out per-domain via static mapping = { id storedAs: String }; set this to
'string' to opt the whole application out.
The default changed from 'string' to 'objectid' in 8.0.0. An
application upgrading with existing string _id data must either migrate that
data or pin 'string' here.
The URL
The username