RDBMS Persistence Properties

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.

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)

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)

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

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

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

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

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

Description Property that controls if only the base class where the discriminator is defined will have a discriminator column
Range of values false | true
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 for JDO and JPA
Range of Values true | false
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

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.

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
Description The direction in which the query results will be navigated.
Range of Values forward | reverse | unknown

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

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

Description Sort order for Oracle String fields in queries (BINARY disables native language sorting)
Range of Values LATIN | See Oracle documentation

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

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

Description Whether to fail if an error occurs, or try to continue and log warnings
Range of Values true | false

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

Description Whether to bypass all calls to DatabaseMetaData.getColumns(). This JDBC method is called to get schema information, but on some JDBC drivers (e.g Derby) it can take an inordinate amout of time. Setting this to true means that your datastore schema has to be correct and no checks will be performed.
Range of Values true | false

Description Name of the plugin to use for defining the names of the aliases of tables in SQL statements.
Range of Values alpha-scheme | t-scheme

Description How we should order the columns in a table. The default is to put the fields of the owning class first, followed by superclasses, then subclasses. An alternative is to start from the base superclass first, working down to the owner, then the subclasses
Range of Values owner-first | superclass-first

Description This property allows you to reuse columns for more than 1 field of a class. It is false by default to protect the user from erroneously typing in a column name. Additionally, if a column is reused, the user ought to think about how to determine which field is written to that column ... all reuse ought to imply the same value in those fields so it doesn't matter which field is written there, or retrieved from there.
Range of Values true | false

Description Whether we should log the SQL parameter values in angle brackets or not. This defaults to true so we can distinguish what is a property, but if you turn it off you see what is the SQL you could use in an SQL console.
Range of Values true | false

Description If enabled will, upon a request to load a field, check for any unloaded fields that are non-relation fields or 1-1/N-1 fields and will load them in the same SQL call.
Range of Values true | false