DataNucleus Configuration

Configuration properties that are passed through directly to DataNucleus, unused by Apache Causeway itself.

Property Default Description

datanucleus.cache.level2.mode

The mode of operation of the L2 cache, deciding which entities are cached.

The default (UNSPECIFIED) is the same as DISABLE_SELECTIVE.

datanucleus.cache.level2.type

soft

Name of the type of Level 2 Cache to use.

Can be used to interface with external caching products. Use "none" to turn off L2 caching; other values include "soft", "weak", "javax.cache".

datanucleus.identifier.case

Which case to use in generated table/column identifier names. See also the Datastore Identifier Guide. RDBMS defaults to UPPERCASE.

datanucleus.manage-relationships

true

Whether DataNucleus will try to manage bidirectional relations, correcting the input objects so that all relations are consistent.

This process runs when flush()/commit() is called. You can set it to false if you always set both sides of a relation when persisting/updating.

For more details, see DataNucleus Config Property docs.

datanucleus.
persistence-by-reachability-at-
commit

true

Whether to run the "persistence-by-reachability" algorithm at commit time.

This means that objects that were reachable at a call to makePersistent() but that are no longer persistent will be removed from persistence. For performance improvements, consider turning this off.

For more details, see DataNucleus Config Property docs.

datanucleus.schema.auto-create-all

Whether to automatically (but lazily) generate any schema, tables, columns, constraints that don’t exist.

For integration testing, it’s generally better to use datanucleus.schema.generateDatabase.mode, which will eagerly create all tables on startup.

@see #setAutoCreateColumns(boolean) @see #setAutoCreateConstraints(boolean) @see #setAutoCreateTables(boolean) @see GenerateDatabase#setMode(String)

datanucleus.schema.
auto-create-columns

Whether to automatically generate any columns that don’t exist.

@see #setAutoCreateAll(boolean) @see #setAutoCreateConstraints(boolean) @see #setAutoCreateTables(boolean) @see GenerateDatabase#setMode(String)

datanucleus.schema.
auto-create-constraints

Whether to automatically generate any constraints that don’t exist.

@see #setAutoCreateAll(boolean) @see #setAutoCreateColumns(boolean) @see #setAutoCreateTables(boolean) @see GenerateDatabase#setMode(String)

datanucleus.schema.
auto-create-database

Whether to automatically generate any database (catalog/schema) that doesn’t exist. This depends very much on whether the datastore in question supports this operation.

datanucleus.schema.
auto-create-tables

Whether to automatically generate any tables that don’t exist.

@see #setAutoCreateAll(boolean) @see #setAutoCreateColumns(boolean) @see #setAutoCreateConstraints(boolean) @see GenerateDatabase#setMode(String)

datanucleus.schema.
generate-database.mode

none

Whether to eagerly create all tables at startup.

For integration testing, this is generally preferred to using datanucleus.schema.autoCreateAll, because the autoCreateAll will only create tables lazily, when first persisted to. While lazily initialization is potentially quicker, it can cause issues (eg with rollup mapping to super class tables).

Valid values: none, create, drop-and-create, drop.

datanucleus.schema.validate-all

Alias for defining validateTables, validateColumns and validateConstraints as true.

datanucleus.schema.
validate-columns

Whether to validate columns against the persistence definition. This refers to the column detail structure and NOT to whether the column exists or not.

datanucleus.schema.
validate-constraints

Whether to validate table constraints against the persistence definition.

datanucleus.schema.validate-tables

Whether to validate tables against the persistence definition.