3.5.4.1. DBDictionary Properties

The standard dictionaries all recognize the following properties. These properties will usually not need to be overridden, since the dictionary implementation should use the appropriate default values for your database. You typically won’t use these properties unless you are designing your own DBDictionary for an unsupported database.

  • AllowsAliasInBulkClause: When true, SQL delete and update statements may use table aliases.

  • AllowsBulkTargetInSubselect: When true, a subquery in the WHERE clause of an SQL delete or update statement may read the table that the statement changes. When false, the statement matches the primary keys of the affected rows in a derived table instead.

  • ArrayTypeName: The overridden default column type for java.sql.Types.ARRAY. This is used only when the schema is generated by the mappingtool.

  • AutoAssignClause: The column definition clause to append to a creation statement. For example, "AUTO_INCREMENT" for MySQL. This property is set automatically in the dictionary, and should not need to be overridden, and is only used when the schema is generated using the mappingtool.

  • AutoAssignTypeName: The column type name for auto-increment columns. For example, "BIGSERIAL" for PostgreSQL. This property is set automatically in the dictionary and should not need to be overridden. It is used only when the schema is generated using the mappingtool.

  • BackslashEscapesInStringLiterals: When true, the database may read a backslash inside a string literal as an escape character. A string value with a backslash is then bound as a parameter instead of being written into the SQL text as a literal, which happens with the openjpa.hint.UseLiteralInSQL query hint and for the values of CASE, COALESCE and NULLIF. MySQL and MariaDB (unless their sql_mode contains NO_BACKSLASH_ESCAPES) and PostgreSQL (with standard_conforming_strings turned off) read a backslash that way, so their dictionaries set it to true. Defaults to false.

  • BatchLimit: The default batch limit for sending multiple SQL statements at once to the database. A value of -1 indicates unlimited batching, and any positive integer indicates the maximum number of SQL statements to batch together. Defaults to 0 which disables batching.

  • BigintTypeName: The overridden default column type for java.sql.Types.BIGINT. This is used only when the schema is generated by the mappingtool.

  • BinaryTypeName: The overridden default column type for java.sql.Types.BINARY. This is used only when the schema is generated by the mappingtool.

  • BitTypeName: The overridden default column type for java.sql.Types.BIT. This is used only when the schema is generated by the mappingtool.

  • BlobBufferSize: This property establishes the buffer size in the INSERT/UPDATE operations with an java.io.InputStream. This is only used with OpenJPA’s LOB Streaming. Defaults to 50000.

  • BlobTypeName: The overridden default column type for java.sql.Types.BLOB. This is used only when the schema is generated by the mappingtool.

  • BooleanRepresentation: The overridden default representation for java.lang.Boolean or boolean fields in JPA Entities. A org.apache.openjpa.jdbc.sql.BooleanRepresentation describes how Boolean values in entities get mapped into the database by default. Note that you additionally might need to define the BooleanTypeName BitTypeName settings to fit your selected BooleanRepresenation.

  • BooleanTypeName: The overridden default column type for java.sql.Types.BOOLEAN. This is used only when the schema is generated by the mappingtool.

  • CastFunction: The SQL function call to cast a value to another SQL type. Use the tokens {0} and {1} to represent the two arguments. The result of the function is convert the {0} value to a {1} type. The default is "CAST({0} AS {1})".

  • CatalogSeparator: The string the database uses to delimit between the schema name and the table name. This is typically ".", which is the default.

  • CharTypeName: The overridden default column type for java.sql.Types.CHAR. This is used only when the schema is generated by the mappingtool.

  • CharacterColumnSize: The default size of varchar and char columns. Typically 255.

  • ClobBufferSize: This property establish the buffer size in the INSERT/UPDATE operations with a java.io.Reader. This is only used with OpenJPA’s LOB Streaming. Defaults to 50000.

  • ClobTypeName: The overridden default column type for java.sql.Types.CLOB. This is used only when the schema is generated by the mappingtool.

  • ClosePoolSQL: A special command to issue to the database when shutting down the pool. Usually the pool of connections to the database is closed when the application is ending. For embedded databases, whose lifecycle is coterminous with the application, there may be a special command, usually "SHUTDOWN", that will cause the embedded database to close cleanly. Defaults to null.

  • ConcatenateFunction: The SQL function call or operation to concatenate two strings. Use the tokens {0} and {1} to represent the two arguments. The result of the function or operation is to concatenate the {1} string to the end of the {0} string. Defaults to "({0}||{1})".

  • ConstraintNameMode: When creating constraints, whether to put the constraint name before the definition ("before"), just after the constraint type name ("mid"), or after the constraint definition ("after"). Defaults to "before".

  • CreatePrimaryKeys: When false, do not create database primary keys for identifiers. Defaults to true.

  • CrossJoinClause: The clause to use for a cross join (cartesian product). Defaults to "CROSS JOIN".

  • CurrentDateFunction: The SQL function call to obtain the current date from the database. Defaults to "CURRENT_DATE".

  • CurrentTimeFunction: The SQL function call to obtain the current time from the database. Defaults to "CURRENT_TIME".

  • CurrentTimestampFunction: The SQL function call to obtain the current timestamp from the database. Defaults to "CURRENT_TIMESTAMP".

  • DateFractionDigits Some databases support to store sub-second fraction values. The digits to store can sometimes be configured. This value defines the default number of digits to store in the database. A dateFractionDigits=3 will e.g. lead to a DATETIME(3) on some databases. Note that this default can be overwritten to an integer value n per column via @Column(scale=n). A @Column(scale=-1) will set the fraction digits to zero.

  • DatePrecision: The database is able to store time values to this degree of precision, which is expressed in nanoseconds. This value is usually one million, meaning that the database is able to store time values with a precision of one millisecond. Particular databases may have more or less precision. OpenJPA will round all time values to this degree of precision before storing them in the database. This property can be set to one of the following precisions:

    • DECI: 100000000

    • CENIT: 10000000

    • MILLI (default precision): 1000000

    • MICRO: 1000

    • NANO (max precision): 1

  • DateMillisecondBehavior: When retrieving a Date value from a database which stores the value in a TIMESTAMP column, the values retrieved will be rounded to the nearest millisecond. So a date of '2010-01-01 12:00:00.687701' stored in the database will become '2010-01-01 12:00:00.688' in the Date field of the entity. The following date stored in the database as '9999-12-31 23:59:59.9999' will become '10000-01-01 00:00:00.000'. This rounding may not be desirable. With this property, a user has options which will direct OpenJPA how to handle the milliseconds. This property can be set to one of the enums defined in DBDictionary.DateMillisecondBehaviors. The options defined in DBDictionary.DateMillisecondBehaviors are as follows:

    • DateMillisecondBehaviors.ROUND: This is the default. The Date will be rounded to the nearest millisecond, as described above.

    • DateMillisecondBehaviors.DROP: The milliseconds will be dropped, thus rounding is not performed. As an example, a date of '2010-01-01 12:00:00.687701' stored in the database will become '2010-01-01 12:00:00.000' in the Date field of the entity.

    • DateMillisecondBehaviors.RETAIN: The milliseconds will not be rounded, but will be retained. As an example, a date of '2010-01-01 12:00:00.687701' stored in the database will become '2010-01-01 12:00:00.687' in the Date field of the entity.

  • DateTypeName: The overridden default column type for java.sql.Types.DATE. This is used only when the schema is generated by the mappingtool.

  • DecimalTypeName: The overridden default column type for java.sql.Types.DECIMAL. This is used only when the schema is generated by the mappingtool.

  • DelimitedCase: The case to use when querying the database about identifiers that have been delimited. It defaults to preserving the case of the originally specified name. Available values are: upper, lower, preserve.

  • DisableAlterSeqenceIncrementBy: OpenJPA attempts to execute an ALTER SEQUENCE…​.INCREMENT BY SQL statement for a user defined sequence. This is done to ensure that the 'allocationSize' value defined by the entity’s sequence, or default value, matches the sequence defined in the database. For example, with an allocationSize of 1000 for a sequence named 'SEQ_JPASAMPLE', the following SQL will be generated (the SQL might vary slightly depending on the databases): ALTER SEQUENCE SEQ_JPASAMPLE INCREMENT BY 1000. If the user executing this command doesn’t have permissions to execute the command, it will fail and in turn OpenJPA will disable sequence caching. If a user wants to disable this SQL command, this property can be set to true. However, the user must ensure that the entities defined sequence is kept in synch with the sequence defined in the database. Defaults to false.

  • DisableSchemaFactoryColumnTypeErrors: When something other than the default SchemaFactory is used, up-front mapping validation is performed against the database schema. As part of the validation, OpenJPA will verify a persistence class column’s type against the column type defined in the database schema. If a mismatch is found, OpenJPA will throw an exception to flag the mismatch types and will not allow processing to continue. This can be limiting, especially if the JDBC driver and/or database can properly handle the mismatch. Set this property to true to disable column type mismatch errors. Defaults to false.

  • DistinctCountColumnSeparator: The string the database uses to delimit between column expressions in a SELECT COUNT(DISTINCT column-list) clause. Defaults to null for most databases, meaning that multiple columns in a distinct COUNT clause are not supported.

  • DistinctTypeName: The overridden default column type for java.sql.Types.DISTINCT. This is used only when the schema is generated by the mappingtool.

  • DoubleTypeName: The overridden default column type for java.sql.Types.DOUBLE. This is used only when the schema is generated by the mappingtool.

  • DriverVendor: The vendor of the particular JDBC driver you are using. Some dictionaries must alter their behavior depending on the driver vendor. Dictionaries usually detect the driver vendor and set this property themselves. See the VENDOR_XXX constants defined in the DBDictionary Javadoc for available options.

  • DropTableSQL: The SQL statement used to drop a table. Use the token {0} as the argument for the table name. Defaults to "DROP TABLE {0}".

  • FixedSizeTypeNames: A comma separated list of additional database types that have a size defined by the database. In other words, when a column of a fixed size type is declared, its size cannot be defined by the user. Common examples would be DATE, FLOAT, and INTEGER. Each database dictionary has its own internal set of fixed size type names that include the names mentioned here and many others. Names added to this property are added to the dictionary’s internal set. Defaults to null.

  • FloatTypeName: The overridden default column type for java.sql.Types.FLOAT. This is used only when the schema is generated by the mappingtool.

  • ForUpdateClause: The clause to append to SELECT statements to issue queries that obtain pessimistic locks. Defaults to "FOR UPDATE".

  • GetStringVal: A special function to return the value of an XML column in a select statement. For example, Oracle uses ".getClobVal()", as in "SELECT t0.xmlcol.getClobVal() FROM xmltab t0". Defaults to the empty string.

  • InClauseLimit: The maximum number of elements in an IN clause. OpenJPA works around cases where the limit is exceeded. Defaults to -1 meaning no limit.

  • IndexPhysicalForeignKeys: Whether a search Index should automatically get created on a physical foreign key. Some databases, like MySQL, handle this internally, so we do not need to generate an explicit Index in our DDL. Other databases need an explicit serach index on foreign key columns to improve performance. IndexPhysicalForeignKeys defaults to true for Oracle, MS-SQL and PostgreSQL.

  • InitializationSQL: A piece of SQL to issue against the database whenever a connection is retrieved from the DataSource.

  • InnerJoinClause: The clause to use for an inner join. Defaults to "INNER JOIN".

  • IntegerTypeName: The overridden default column type for java.sql.Types.INTEGER. This is used only when the schema is generated by the mappingtool.

  • JavaObjectTypeName: The overridden default column type for java.sql.Types.JAVAOBJECT. This is used only when the schema is generated by the mappingtool.

  • JoinSyntax: The SQL join syntax to use in select statements. See Setting the SQL Join Syntax.

  • LastGeneratedKeyQuery: The query to issue to obtain the last automatically generated key for an auto-increment column. For example, "SELECT LAST_INSERT_ID()" for MySQL. This property is set automatically in the dictionary, and should not need to be overridden. If SupportsGetGeneratedKeys is true, the query will not be issued but a more efficient JDBC 3.0 mechanism for obtaining generated keys will be used instead.

  • LeadingDelimiter: The characters to use as the leading delimiter for a delimited identifier. The default value is a double quote, ("). See Delimited Identifiers Support for the default value for some specific databases.

  • LongVarbinaryTypeName: The overridden default column type for java.sql.Types.LONGVARBINARY. This is used only when the schema is generated by the mappingtool.

  • LongVarcharTypeName: The overridden default column type for java.sql.Types.LONGVARCHAR. This is used only when the schema is generated by the mappingtool.

  • MaxAutoAssignNameLength: Set this property to the maximum length of the sequence name used for auto-increment columns. Names longer than this value are truncated. Defaults to 31.

  • MaxColumnNameLength: The maximum number of characters in a column name. Defaults to 128.

  • MaxConstraintNameLength: The maximum number of characters in a constraint name. Defaults to 128.

  • MaxEmbeddedBlobSize: When greater than -1, the maximum size of a BLOB value that can be sent directly to the database within an insert or update statement. Values whose size is greater than MaxEmbeddedBlobSize force OpenJPA to work around this limitation. A value of -1 means that there is no limitation. Defaults to -1.

  • MaxEmbeddedClobSize: When greater than -1, the maximum size of a CLOB value that can be sent directly to the database within an insert or update statement. Values whose size is greater than MaxEmbeddedClobSize force OpenJPA to work around this limitation. A value of -1 means that there is no limitation. Defaults to -1.

  • MaxIndexNameLength: The maximum number of characters in an index name. Defaults to 128.

  • MaxIndexesPerTable: The maximum number of indexes that can be placed on a single table. Defaults to no limit.

  • MaxTableNameLength: The maximum number of characters in a table name. Defaults to 128.

  • NameConcatenator: The value used when names are concatenated to create a generated name. The default value is the underscore "_".

  • NextSequenceQuery: A SQL string for obtaining a native sequence value. May use a placeholder of {0} for the variable sequence name and {1} for sequence increment. Defaults to a database-appropriate value. For example, "SELECT {0}.NEXTVAL FROM DUAL" for Oracle database.

  • NullTypeName: The overridden default column type for java.sql.Types.NULL. This is used only when the schema is generated by the mappingtool.

  • NumericTypeName: The overridden default column type for java.sql.Types.NUMERIC. This is used only when the schema is generated by the mappingtool.

  • OtherTypeName: The overridden default column type for java.sql.Types.OTHER. This is used only when the schema is generated by the mappingtool.

  • OuterJoinClause: The clause to use for an left outer join. Defaults to "LEFT OUTER JOIN".

  • Platform: The name of the database that this dictionary targets. Defaults to "Generic", but all dictionaries override this value.

  • RangePosition: Indicates where to specify in the SQL select statement the range, if any, of the result rows to be returned. When limiting the number of returned result rows to a subset of all those that satisfy the query’s conditions, the position of the range clause varies by database. Defaults to 0, meaning that the range is expressed at the end of the select statement but before any locking clause. See the RANGE_XXX constants defined in DBDictionary.

  • RealTypeName: The overridden default column type for java.sql.Types.REAL. This is used only when the schema is generated by the mappingtool.

  • RefTypeName: The overridden default column type for java.sql.Types.REF. This is used only when the schema is generated by the mappingtool.

  • RequiresAliasForSubselect: When true, the database requires that subselects in a FROM clause be assigned an alias.

  • RequiresAutoCommitForMetadata: When true, the JDBC driver requires that autocommit be enabled before any schema interrogation operations can take place.

  • RequiresCastForCaseStringResult: When true, a string literal, or a parameter bound to a string, returned by a CASE expression is cast to VARCHAR in the generated SQL, for databases that type a string literal as CHAR and pad the result of the CASE to the length of its longest result. Defaults to false.

  • RequiresCastForComparisons: When true, comparisons of two values of different types or of two literals requires a cast in the generated SQL. Defaults to false.

  • RequiresCastForMathFunctions: When true, math operations on two values of different types or on two literals requires a cast in the generated SQL. Defaults to false.

  • RequiresCastForExtractOperand: When true, a parameter or literal operand of EXTRACT that is bound as a parameter is cast to DATE, TIME or TIMESTAMP in the generated SQL. Defaults to false.

  • RequiresConditionForCrossJoin: Some databases require that there always be a conditional statement for a cross join. If set, this parameter ensures that there will always be some condition to the join clause.

  • RequiresTargetForDelete: When true, the database requires a target for delete statements. Defaults to false.

  • ReservedWords: A comma-separated list of reserved words for this database, beyond the standard SQL92 keywords.

  • SchemaCase: The case to use when querying the database metadata about schema components. Defaults to making all names upper case. Available values are: upper, lower, preserve.

  • SearchStringEscape: The SQL string literal rendering of the backslash escape character, written into the ESCAPE clause of a generated SQL LIKE when the query itself supplies a backslash as its escape character. A database which consumes a backslash while parsing a string literal needs it doubled here. On MySQL and MariaDB that doubling is only correct while sql_mode contains no NO_BACKSLASH_ESCAPES; with that mode the server stops consuming backslashes and rejects the clause with ERROR 1210, so a query which runs against it has to pick an escape character other than a backslash. Defaults to "\\" (a single backslash in Java speak). Note: this character never gains an escape meaning inside a query pattern. A LIKE without an ESCAPE clause has no escape character at all, as Jakarta Persistence requires.

  • SearchStringNoEscape: The SQL expression written into the ESCAPE clause of a generated SQL LIKE whose query supplied no escape character, used when RequiresSearchStringEscapeForLike is true. Defaults to "''", the empty string literal, which is a non-standard spelling of "no escape character" accepted by H2 and PostgreSQL, and by MySQL only while sql_mode contains no NO_BACKSLASH_ESCAPES; a standard conforming database such as Derby rejects it, since the standard wants exactly one character. A dictionary which turns RequiresSearchStringEscapeForLike on therefore has to supply a value its database accepts. MySQL uses "CHAR(0)" because of the sql_mode above, and MariaDB because it ignores an empty escape clause altogether and keeps its backslash escape; that expression has the same effect for every pattern which does not contain a NUL character.

  • RequiresSearchStringEscapeForLike: When true, the database requires an explicit ESCAPE clause for queries that use LIKE, because its LIKE defaults to an escape character of its own (a backslash on H2, MySQL, MariaDB and PostgreSQL). OpenJPA then writes the SearchStringNoEscape expression into an ESCAPE clause, which gives such a database the no escape character behaviour Jakarta Persistence requires. Defaults to false.

  • SelectWords: A comma-separated list of keywords which may be used to start a SELECT statement for this database. If an application executes a native SQL statement which begins with SelectWords OpenJPA will treat the statement as a SELECT statement rather than an UPDATE statement.

  • SequenceNameSQL: Additional phrasing to use with SequenceSQL. Defaults to null.

  • SequenceSQL: General structure of the SQL query to use when interrogating the database for sequence names. As there is no standard way to obtain sequence names, it defaults to null.

  • SequenceSchemaSQL: Additional phrasing to use with SequenceSQL. Defaults to null.

  • SimulateLocking: Some databases do not support pessimistic locking, which will result in an exception when you attempt a transaction while using the pessimistic lock manager. Setting this property to true suppresses the locking of rows in the database, thereby allowing pessimistic transactions even on databases that do not support locking. At the same time, setting this property to true means that you do not obtain the semantics of a pessimistic transaction with the database. Defaults to false.

  • SmallintTypeName: The overridden default column type for java.sql.Types.SMALLINT. This is used only when the schema is generated by the mappingtool.

  • StorageLimitationsFatal: When true, any data truncation/rounding that is performed by the dictionary in order to store a value in the database will be treated as a fatal error, rather than just issuing a warning.

  • StoreCharsAsNumbers: Set this property to false to store Java char fields as CHAR values rather than numbers. Defaults to true, except on DB2, Apache Derby, H2, MariaDB, Microsoft SQL Server, MySQL, Oracle and PostgreSQL 9 and later, where the default is false (native CHAR(1) storage; on Oracle the generated column is CHAR(1 CHAR), which holds a character of any byte length). An explicitly configured value is always respected. Schemas created by earlier OpenJPA releases on PostgreSQL, MySQL, MariaDB, Derby, H2, SQL Server or Oracle store char fields in numeric columns and require StoreCharsAsNumbers=true.

  • StoreLargeNumbersAsStrings: When true, the dictionary prefers to store Java fields of type BigInteger and BigDecimal as string values in the database. Likewise, the dictionary will instruct the mapping tool to map these Java types to character columns. Because some databases have limitations on the number of digits that can be stored in a numeric column (for example, Oracle can only store 38 digits), this option may be necessary for some applications. Note that this option may prevent OpenJPA from executing meaningful numeric queries against the columns. Defaults to false.

  • StringLengthFunction: Name of the SQL function for getting the length of a string. Use the token {0} to represent the argument.

  • StructTypeName: The overridden default column type for java.sql.Types.STRUCT. This is used only when the schema is generated by the mappingtool.

  • SubstringFunctionName: Name of the SQL function for getting the substring of a string.

  • SupportsAlterTableWithAddColumn: When true, the database supports adding a new column in an ALTER TABLE statement. Defaults to true.

  • SupportsAlterTableWithDropColumn: When true, the database supports dropping a column in an ALTER TABLE statement. Defaults to true.

  • SupportsAutoAssign: When true, the database supports auto-assign columns, where the value of column is assigned upon insertion of the row into the database. Defaults to false.

  • SupportsCascadeDeleteAction: When true, the database supports the CASCADE delete action on foreign keys. Defaults to true.

  • SupportsCascadeUpdateAction: When true, the database supports the CASCADE update action on foreign keys. Defaults to true.

  • SupportsComments: When true, comments can be associated with the table in the table creation statement. Defaults to false.

  • SupportsCorrelatedSubselect: When true, the database supports correlated subselects. Correlated subselects are select statements nested within select statements that refers to a column in the outer select statement. For performance reasons, correlated subselects are generally a last resort. Defaults to true.

  • SupportsDefaultDeleteAction: When true, the database supports the SET DEFAULT delete action on foreign keys. Defaults to true.

  • SupportsDefaultUpdateAction: When true, the database supports the SET DEFAULT update action on foreign keys. Defaults to true.

  • SupportsDeferredConstraints: When true, the database supports deferred constraints. The database supports deferred constraints by checking for constraint violations when the transaction commits, rather than checking for violations immediately after receiving each SQL statement within the transaction. Defaults to true.

  • SupportsDelimitedIdentifiers: When true, the database supports delimited identifiers. It defaults to true.

  • SupportsForeignKeys: When true, the database supports foreign keys. Defaults to true.

  • SupportsForeignKeysComposite: When true, the database supports composite foreign keys. Defaults to true.

  • SupportsGetGeneratedKeys: When true, OpenJPA will use java.sql.Statement.getGeneratedKeys method to obtain values of auto-increment columns. When false, a query specified by LastGeneratedKeyQuery will be used for that purpose. If not set, the value will be auto-detected by querying the JDBC driver. Setting the value to true requires that the JDBC driver supports version 3.0 or higher of the JDBC specification and supports the java.sql.Statement.getGeneratedKeys method.

  • SupportsHaving: When true, the database supports HAVING clauses in selects.

  • SupportsLockingWithDistinctClause: When true, the database supports FOR UPDATE select clauses with DISTINCT clauses.

  • SupportsLockingWithInnerJoin: When true, the database supports FOR UPDATE select clauses with inner join queries.

  • SupportsLockingWithMultipleTables: When true, the database supports FOR UPDATE select clauses that select from multiple tables.

  • SupportsLockingWithOrderClause: When true, the database supports FOR UPDATE select clauses with ORDER BY clauses.

  • SupportsLockingWithOuterJoin: When true, the database supports FOR UPDATE select clauses with outer join queries.

  • SupportsLockingWithSelectRange: When true, the database supports FOR UPDATE select clauses with queries that select a range of data using LIMIT, TOP or the database equivalent. Defaults to true.

  • SupportsModOperator: When true, the database supports the modulus operator (%) instead of the MOD function. Defaults to false.

  • SupportsMultipleNontransactionalResultSets: When true, a nontransactional connection is capable of having multiple open ResultSet instances.

  • SupportsNullDeleteAction: When true, the database supports the SET NULL delete action on foreign keys. Defaults to true.

  • SupportsNullTableForGetColumns: When true, the database supports passing a null parameter to DatabaseMetaData.getColumns as an optimization to get information about all the tables. Defaults to true.

  • SupportsNullTableForGetImportedKeys: When true, the database supports passing a null parameter to DatabaseMetaData.getImportedKeys as an optimization to get information about all the tables. Defaults to false.

  • SupportsNullTableForGetIndexInfo: When true, the database supports passing a null parameter to DatabaseMetaData.getIndexInfo as an optimization to get information about all the tables. Defaults to false.

  • SupportsNullTableForGetPrimaryKeys: When true, the database supports passing a null parameter to DatabaseMetaData.getPrimaryKeys as an optimization to get information about all the tables. Defaults to false.

  • SupportsNullUpdateAction: When true, the database supports the SET NULL update action on foreign keys. Defaults to true.

  • SupportsQueryTimeout: When true, the JDBC driver supports calls to java.sql.Statement.setQueryTimeout.

  • AllowQueryTimeoutOnFindUpdate: The JPA Specification defines the jakarta.persistence.query.timeout, in milliseconds, as a hint to the provider. The hint is used for Query operations. This property, when set to true, will allow the query timeout hint to apply to EntityManager operations. For example, when a 'find' is executed and the resultant entity updated, the query timeout will apply to the SQL update operation. This property defaults to false.

  • SupportsRestrictDeleteAction: When true, the database supports the RESTRICT delete action on foreign keys. Defaults to true.

  • SupportsRestrictUpdateAction: When true, the database supports the RESTRICT update action on foreign keys. Defaults to true.

  • SupportsSchemaForGetColumns: When false, the database driver does not support using the schema name for schema reflection on column names.

  • SupportsSchemaForGetTables: If false, then the database driver does not support using the schema name for schema reflection on table names.

  • SupportsSelectEndIndex: When true, the database can create a select that is limited to the first N results.

  • SupportsSelectForUpdate: When true, the database supports SELECT statements with a pessimistic locking (FOR UPDATE) clause. Defaults to true.

  • SupportsSelectStartIndex: When true, the database can create a select that skips the first N results.

  • SupportsSimpleCaseExpression: When true, the database supports the simple form of CASE expression: CASE <a> WHEN <b> THEN <c> WHEN <d> THEN <e> ELSE <f> END. When false, the general form of CASE expression will be used: CASE WHEN <a> = <b> THEN <c> WHEN <a> = <d> THEN <e> ELSE <f> END. Defaults to true.

  • SupportsSubselect: When true, the database supports subselects in queries.

  • SupportsTimestampNanos: When true, the database supports nanoseconds with TIMESTAMP columns. Defaults to true.

  • SupportsUniqueConstraints: When true, the database supports unique constraints. Defaults to true.

  • SupportsXMLColumn: When true, the database supports an XML column type. See XML Column Mapping for information on using this capability. Defaults to false.

  • SystemSchemas: A comma-separated list of schema names that should be ignored.

  • SystemTables: A comma-separated list of table names that should be ignored.

  • TableForUpdateClause: The clause to append to the end of each table alias in queries that obtain pessimistic locks. Defaults to null.

  • tableLengthIncludesSchema: Whether the max length for a table name includes the table’s schema. Defaults to false.

  • TableTypes: Comma-separated list of table types to use when looking for tables during schema reflection, as defined in the java.sql.DatabaseMetaData.getTableInfo JDBC method. An example is: "TABLE,VIEW,ALIAS". Defaults to "TABLE".

  • TimeTypeName: The overridden default column type for java.sql.Types.TIME. This is used only when the schema is generated by the mappingtool.

  • TimestampTypeName: The overridden default column type for java.sql.Types.TIMESTAMP. This is used only when the schema is generated by the mappingtool.

  • TinyintTypeName: The overridden default column type for java.sql.Types.TINYINT. This is used only when the schema is generated by the mappingtool.

  • ToLowerCaseFunction: Name of the SQL function for converting a string to lower case. Use the token {0} to represent the argument.

  • ToUpperCaseFunction: SQL function call for converting a string to upper case. Use the token {0} to represent the argument.

  • TrailingDelimiter: The characters to use as the trailing delimiter for a delimited identifier. The default value is a double quote, ("). See Delimited Identifiers Support for the default value for some specific databases.

  • TrimBothFunction: The SQL function call to trim any number of a particular character from both the start and end of a string. Note: some databases do not support specifying the character in which case only spaces or whitespace can be trimmed. Use the token {1} when possible to represent the character, and the token {0} to represent the string. Defaults to "TRIM(BOTH {1} FROM {0})".

  • TrimLeadingFunction: The SQL function call to trim any number of a particular character from the start of a string. Note: some databases do not support specifying the character in which case only spaces or whitespace can be trimmed. Use the token {1} when possible to represent the character, and the token {0} to represent the string. Defaults to "TRIM(LEADING {1} FROM {0})".

  • TrimStringColumns: When true, the resulting String from ResultSet.getString will be trimmed of trailing white space. Defaults to false.

  • TrimTrailingFunction: The SQL function call to trim any number of a particular character from the end of a string. Note: some databases do not support specifying the character in which case only spaces or whitespace can be trimmed. Use the token {1} when possible to represent the character, and the token {0} to represent the string. Defaults to "TRIM(TRAILING {1} FROM {0})".

  • UseGetBestRowIdentifierForPrimaryKeys: When true, metadata queries will use DatabaseMetaData.getBestRowIdentifier to obtain information about primary keys, rather than DatabaseMetaData.getPrimaryKeys.

  • UseGetBytesForBlobs: When true, ResultSet.getBytes will be used to obtain blob data rather than ResultSet.getBinaryStream.

  • UseGetObjectForBlobs: When true, ResultSet.getObject will be used to obtain blob data rather than ResultSet.getBinaryStream.

  • UseGetStringForClobs: When true, ResultSet.getString will be used to obtain clob data rather than ResultSet.getCharacterStream.

  • UseJDBC4SetBinaryStream: When true, an attempt will be made to obtain a JDBC 4.0 version of PreparedStatement.setBinaryStream. When false, a setBinaryStream is used which takes the length of the stream. OpenJPA uses a -1 for the length since OpenJPA doesn’t know the length of the stream. A few JDBC drivers check the length and throw an exception when the length is less than zero. When this property is set to true, and an applicable JDK and JDBC 4.0 driver is available, a version of setBinaryStream will be used which does not take a length. The default value of this property is true.

  • UseNativeSequenceCache: This property was introduced in the 2.1.2 release to indicate (when set to false) that OpenJPA should not use the CACHE clause when creating a native sequence; instead the INCREMENT BY clause gets its value equal to the allocationSize property. In the 2.2.0 release, code was added to allow said functionality by default (see OPENJPA-1376). For forward compatibility, this property still remains, however it has been deprecated and will eventually be removed. Setting this property has no effect and any occurrence of it should be removed.

  • UseSchemaName: If false, then avoid including the schema name in table name references. Defaults to true.

  • UseSetBytesForBlobs: When true, PreparedStatement.setBytes will be used to set blob data, rather than PreparedStatement.setBinaryStream.

  • UseSetStringForClobs: When true, PreparedStatement.setString will be used to set clob data, rather than PreparedStatement.setCharacterStream.

  • UseWildCardForCount: When true, the JPQL COUNT aggregate function will be translated into SQL COUNT(*) expression if the SQL query does not involve joins. Defaults to false.

  • ValidationSQL: The SQL used to validate that a connection is still in a valid state. For example, "SELECT SYSDATE FROM DUAL" for Oracle.

  • VarbinaryTypeName: The overridden default column type for java.sql.Types.VARBINARY. This is used only when the schema is generated by the mappingtool.

  • VarcharTypeName: The overridden default column type for java.sql.Types.VARCHAR. This is used only when the schema is generated by the mappingtool.

  • XmlTypeName: The column type name for XML columns. This property is set automatically in the dictionary and should not need to be overridden. It is used only when the schema is generated using the mappingtool. Defaults to "XML".