|
DataNucleus accepts a large number of persistence properties
for use when defining either a
PersistenceManagerFactory
or an
EntityManagerFactory
.
For RDBMS datastores there are several additional properties. These are listed here. Bear in mind that
these only work with DataNucleus, and not with any other JDO/JPA implementation.
|
datanucleus.rdbms.datastoreAdapterClassName
|
|
Description
|
This property allows you to supply the class name of the adapter to use for your
datastore.
The default is not to specify this property and DataNucleus will autodetect the
datastore type and use its own internal datastore adapter classes. This allows you
to override the default behaviour where there maybe is some issue with the default
adapter class.
|
|
Range of Values
|
(valid class name on the CLASSPATH)
|
|
datanucleus.rdbms.statementBatchLimit
|
|
Description
|
Maximum number of statements that can be batched. The default is 50 and also applies to
delete of objects.
Please refer to the Statement Batching guide
|
|
Range of Values
|
integer value (0 = no batching)
|
|
datanucleus.rdbms.checkExistTablesOrViews
|
|
Description
|
Whether to check if the table/view exists. If false, it disables the automatic generation
of tables that don't exist.
|
|
Range of Values
|
true
| false
|
|
datanucleus.rdbms.initializeColumnInfo
|
|
Description
|
Allows control over what column information is initialised when a table is loaded for the
first time. By default info for all columns will be loaded. Unfortunately some RDBMS are
particularly poor at returning this information so we allow reduced forms to just load the
primary key column info, or not to load any.
|
|
Range of Values
|
ALL
| PK | NONE
|
|
datanucleus.rdbms.classAdditionMaxRetries
|
|
Description
|
The maximum number of retries when trying to find a class to persist or when validating a class.
|
|
Range of Values
|
3
| A positive integer
|
|
datanucleus.rdbms.constraintCreateMode
|
|
Description
|
How to determine the RDBMS constraints to be created.
DataNucleus
will automatically add foreign-keys/indices to handle all relationships, and will
utilise the specified MetaData foreign-key information.
JDO2
will only use the information in the MetaData file(s).
|
|
Range of Values
|
DataNucleus
| JDO2
|
|
datanucleus.rdbms.uniqueConstraints.mapInverse
|
|
Description
|
Whether to add unique constraints to the element table for a map inverse field.
Possible values are true or false.
|
|
Range of values
|
true
| false
|
|
datanucleus.rdbms.discriminatorPerSubclassTable
|
|
Description
|
Property that controls if only the base class where the discriminator is defined will
have a discriminator column
|
|
Range of values
|
false
| true
|
|
datanucleus.rdbms.useUpdateLock
|
|
Description
|
Whether DataNucleus should use 'SELECT ... FOR UPDATE' on all fetch operations to prevent dirty
writes. Only applies to read committed and read uncommitted transaction isolation level
and doesn't apply to Optimistic Transactions.
Please refer to the Transaction Types Guide
|
|
Range of Values
|
true |
false
|
|
datanucleus.rdbms.stringDefaultLength
|
|
Description
|
The default (max) length to use for all strings that don't have their column length defined
in MetaData.
|
|
Range of Values
|
256 (JDO)
|
255 (JPA)
| A valid length
|
|
datanucleus.rdbms.stringLengthExceededAction
|
|
Description
|
Defines what happens when persisting a String field and its length exceeds the length of the
underlying datastore column. The default is to throw an Exception. The other option is to
truncate the String to the length of the datastore column.
|
|
Range of Values
|
EXCEPTION
| TRUNCATE
|
|
datanucleus.rdbms.persistEmptyStringAsNull
|
|
Description
|
When persisting en empty string, should it be persisted as null in the datastore.
This is to allow for datastores (Oracle) that dont differentiate between null
and empty string. If it is set to false and the datastore doesnt differentiate then
a special character will be saved when storing an empty string.
|
|
Range of Values
|
true |
false
|
|
datanucleus.rdbms.sql.allowAllSQLStatements
|
|
Description
|
javax.jdo.query.SQL queries are allowed by JDO 2 only to run SELECT queries.
This extension permits to bypass this limitation (so for example can execute stored procedures).
|
|
Range of Values
|
false
| true
|
|
datanucleus.rdbms.query.fetchDirection
|
|
Description
|
The direction in which the query results will be navigated.
|
|
Range of Values
|
forward
| reverse | unknown
|
|
datanucleus.rdbms.query.resultSetType
|
|
Description
|
Type of ResultSet to create. Note 1) Not all JDBC drivers accept all options. The values correspond
directly to the ResultSet options. Note 2) Not all java.util.List operations are available for scrolling result sets. An Exception is raised when unsupported operations are invoked.
|
|
Range of Values
|
forward-only
| scroll-sensitive | scroll-insensitive
|
|
datanucleus.rdbms.query.resultSetConcurrency
|
|
Description
|
Whether the ResultSet is readonly or can be updated. Not all JDBC drivers support all options.
The values correspond directly to the ResultSet options.
|
|
Range of Values
|
read-only
| updateable
|
|
datanucleus.rdbms.jdoql.joinType
|
|
Description
|
When running a JDOQL query, this defines what type of joins DataNucleus should try to use
overriding the natural choice for the query. In some situations the user may know that
it should use "INNER", or "LEFT OUTER" joins only.
|
|
Range of Values
|
INNER | LEFT OUTER
|
|
datanucleus.rdbms.jdoql.existsIncludesConstraints
|
|
Description
|
When a JDOQL query has a "contains" clause this will be replaced by an EXISTS
sub-query. This property defines whether all other clauses should be applied
to this sub-query, instead of the parent query. In some cases this will lead
to inefficient queries.
|
|
Range of Values
|
true
| false
|
|
datanucleus.rdbms.oracleNlsSortOrder
|
|
Description
|
Sort order for Oracle String fields in queries (BINARY disables native language sorting)
|
|
Range of Values
|
LATIN
| See Oracle documentation
|
|
datanucleus.rdbms.schemaTable.tableName
|
|
Description
|
Name of the table to use when using auto-start mechanism of "SchemaTable"
Please refer to the RDBMS Auto-Start guide
|
|
Range of Values
|
NUCLEUS_TABLES | Valid table name
|
|
datanucleus.rdbms.connectionProviderName
|
|
Description
|
Name of the connection provider to use to allow failover
Please refer to the Failover guide
|
|
Range of Values
|
PriorityList
| Name of a provider
|
|
datanucleus.rdbms.connectionProviderFailOnError
|
|
Description
|
Whether to fail if an error occurs, or try to continue and log warnings
|
|
Range of Values
|
true |
false
|
|
datanucleus.rdbms.dynamicSchemaUpdates
|
|
Description
|
Whether to allow dynamic updates to the schema. This means that upon each insert/update
the types of objects will be tested and any previously unknown implementations of
interfaces will be added to the existing schema.
|
|
Range of Values
|
true |
false
|
|
|