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 forjava.sql.Types.ARRAY. This is used only when the schema is generated by themappingtool. -
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 themappingtool. -
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 themappingtool. -
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 theopenjpa.hint.UseLiteralInSQLquery hint and for the values ofCASE,COALESCEandNULLIF. MySQL and MariaDB (unless theirsql_modecontainsNO_BACKSLASH_ESCAPES) and PostgreSQL (withstandard_conforming_stringsturned off) read a backslash that way, so their dictionaries set it to true. Defaults tofalse. -
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 forjava.sql.Types.BIGINT. This is used only when the schema is generated by themappingtool. -
BinaryTypeName: The overridden default column type forjava.sql.Types.BINARY. This is used only when the schema is generated by themappingtool. -
BitTypeName: The overridden default column type forjava.sql.Types.BIT. This is used only when the schema is generated by themappingtool. -
BlobBufferSize: This property establishes the buffer size in theINSERT/UPDATEoperations with anjava.io.InputStream. This is only used with OpenJPA’s LOB Streaming. Defaults to 50000. -
BlobTypeName: The overridden default column type forjava.sql.Types.BLOB. This is used only when the schema is generated by themappingtool. -
BooleanRepresentation: The overridden default representation forjava.lang.Booleanorbooleanfields 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 theBooleanTypeNameBitTypeNamesettings to fit your selected BooleanRepresenation. -
BooleanTypeName: The overridden default column type forjava.sql.Types.BOOLEAN. This is used only when the schema is generated by themappingtool. -
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 forjava.sql.Types.CHAR. This is used only when the schema is generated by themappingtool. -
CharacterColumnSize: The default size ofvarcharandcharcolumns. Typically 255. -
ClobBufferSize: This property establish the buffer size in theINSERT/UPDATEoperations with ajava.io.Reader. This is only used with OpenJPA’s LOB Streaming. Defaults to 50000. -
ClobTypeName: The overridden default column type forjava.sql.Types.CLOB. This is used only when the schema is generated by themappingtool. -
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 tonull. -
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 totrue. -
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". -
DateFractionDigitsSome 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. AdateFractionDigits=3will e.g. lead to aDATETIME(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 aDatevalue 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 theDatefield 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 inDBDictionary.DateMillisecondBehaviors. The options defined inDBDictionary.DateMillisecondBehaviorsare as follows:-
DateMillisecondBehaviors.ROUND: This is the default. TheDatewill 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 theDatefield 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 theDatefield of the entity.
-
-
DateTypeName: The overridden default column type forjava.sql.Types.DATE. This is used only when the schema is generated by themappingtool. -
DecimalTypeName: The overridden default column type forjava.sql.Types.DECIMAL. This is used only when the schema is generated by themappingtool. -
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 aSELECT COUNT(DISTINCT column-list)clause. Defaults tonullfor most databases, meaning that multiple columns in a distinct COUNT clause are not supported. -
DistinctTypeName: The overridden default column type forjava.sql.Types.DISTINCT. This is used only when the schema is generated by themappingtool. -
DoubleTypeName: The overridden default column type forjava.sql.Types.DOUBLE. This is used only when the schema is generated by themappingtool. -
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 theVENDOR_XXXconstants defined in theDBDictionaryJavadoc 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 beDATE,FLOAT, andINTEGER. 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 tonull. -
FloatTypeName: The overridden default column type forjava.sql.Types.FLOAT. This is used only when the schema is generated by themappingtool. -
ForUpdateClause: The clause to append toSELECTstatements 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 anINclause. 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 theDataSource. -
InnerJoinClause: The clause to use for an inner join. Defaults to"INNER JOIN". -
IntegerTypeName: The overridden default column type forjava.sql.Types.INTEGER. This is used only when the schema is generated by themappingtool. -
JavaObjectTypeName: The overridden default column type forjava.sql.Types.JAVAOBJECT. This is used only when the schema is generated by themappingtool. -
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. IfSupportsGetGeneratedKeysis 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 forjava.sql.Types.LONGVARBINARY. This is used only when the schema is generated by themappingtool. -
LongVarcharTypeName: The overridden default column type forjava.sql.Types.LONGVARCHAR. This is used only when the schema is generated by themappingtool. -
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 aBLOBvalue that can be sent directly to the database within an insert or update statement. Values whose size is greater thanMaxEmbeddedBlobSizeforce 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 aCLOBvalue that can be sent directly to the database within an insert or update statement. Values whose size is greater thanMaxEmbeddedClobSizeforce 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 forjava.sql.Types.NULL. This is used only when the schema is generated by themappingtool. -
NumericTypeName: The overridden default column type forjava.sql.Types.NUMERIC. This is used only when the schema is generated by themappingtool. -
OtherTypeName: The overridden default column type forjava.sql.Types.OTHER. This is used only when the schema is generated by themappingtool. -
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 inDBDictionary. -
RealTypeName: The overridden default column type forjava.sql.Types.REAL. This is used only when the schema is generated by themappingtool. -
RefTypeName: The overridden default column type forjava.sql.Types.REF. This is used only when the schema is generated by themappingtool. -
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 aCASEexpression is cast toVARCHARin the generated SQL, for databases that type a string literal asCHARand pad the result of theCASEto the length of its longest result. Defaults tofalse. -
RequiresCastForComparisons: When true, comparisons of two values of different types or of two literals requires a cast in the generated SQL. Defaults tofalse. -
RequiresCastForMathFunctions: When true, math operations on two values of different types or on two literals requires a cast in the generated SQL. Defaults tofalse. -
RequiresCastForExtractOperand: When true, a parameter or literal operand ofEXTRACTthat is bound as a parameter is cast toDATE,TIMEorTIMESTAMPin the generated SQL. Defaults tofalse. -
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 tofalse. -
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 theESCAPEclause of a generated SQLLIKEwhen 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 whilesql_modecontains noNO_BACKSLASH_ESCAPES; with that mode the server stops consuming backslashes and rejects the clause withERROR 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. ALIKEwithout anESCAPEclause has no escape character at all, as Jakarta Persistence requires. -
SearchStringNoEscape: The SQL expression written into theESCAPEclause of a generated SQLLIKEwhose query supplied no escape character, used whenRequiresSearchStringEscapeForLikeis 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 whilesql_modecontains noNO_BACKSLASH_ESCAPES; a standard conforming database such as Derby rejects it, since the standard wants exactly one character. A dictionary which turnsRequiresSearchStringEscapeForLikeon therefore has to supply a value its database accepts. MySQL uses"CHAR(0)"because of thesql_modeabove, 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 explicitESCAPEclause for queries that useLIKE, because itsLIKEdefaults to an escape character of its own (a backslash on H2, MySQL, MariaDB and PostgreSQL). OpenJPA then writes theSearchStringNoEscapeexpression into anESCAPEclause, which gives such a database the no escape character behaviour Jakarta Persistence requires. Defaults tofalse. -
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 withSequenceSQL. Defaults tonull. -
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 tonull. -
SequenceSchemaSQL: Additional phrasing to use withSequenceSQL. Defaults tonull. -
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 totruesuppresses 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 totruemeans that you do not obtain the semantics of a pessimistic transaction with the database. Defaults tofalse. -
SmallintTypeName: The overridden default column type forjava.sql.Types.SMALLINT. This is used only when the schema is generated by themappingtool. -
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 tofalseto store Javacharfields asCHARvalues rather than numbers. Defaults totrue, except on DB2, Apache Derby, H2, MariaDB, Microsoft SQL Server, MySQL, Oracle and PostgreSQL 9 and later, where the default isfalse(nativeCHAR(1)storage; on Oracle the generated column isCHAR(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 storecharfields in numeric columns and requireStoreCharsAsNumbers=true. -
StoreLargeNumbersAsStrings: When true, the dictionary prefers to store Java fields of typeBigIntegerandBigDecimalas 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 tofalse. -
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 forjava.sql.Types.STRUCT. This is used only when the schema is generated by themappingtool. -
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 totrue. -
SupportsAlterTableWithDropColumn: When true, the database supports dropping a column in an ALTER TABLE statement. Defaults totrue. -
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 tofalse. -
SupportsCascadeDeleteAction: When true, the database supports theCASCADEdelete action on foreign keys. Defaults totrue. -
SupportsCascadeUpdateAction: When true, the database supports theCASCADEupdate action on foreign keys. Defaults totrue. -
SupportsComments: When true, comments can be associated with the table in the table creation statement. Defaults tofalse. -
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 totrue. -
SupportsDefaultDeleteAction: When true, the database supports theSET DEFAULTdelete action on foreign keys. Defaults totrue. -
SupportsDefaultUpdateAction: When true, the database supports theSET DEFAULTupdate action on foreign keys. Defaults totrue. -
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 totrue. -
SupportsDelimitedIdentifiers: When true, the database supports delimited identifiers. It defaults totrue. -
SupportsForeignKeys: When true, the database supports foreign keys. Defaults totrue. -
SupportsForeignKeysComposite: When true, the database supports composite foreign keys. Defaults totrue. -
SupportsGetGeneratedKeys: When true, OpenJPA will usejava.sql.Statement.getGeneratedKeysmethod to obtain values of auto-increment columns. When false, a query specified byLastGeneratedKeyQuerywill 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 thejava.sql.Statement.getGeneratedKeysmethod. -
SupportsHaving: When true, the database supports HAVING clauses in selects. -
SupportsLockingWithDistinctClause: When true, the database supportsFOR UPDATEselect clauses withDISTINCTclauses. -
SupportsLockingWithInnerJoin: When true, the database supportsFOR UPDATEselect clauses with inner join queries. -
SupportsLockingWithMultipleTables: When true, the database supportsFOR UPDATEselect clauses that select from multiple tables. -
SupportsLockingWithOrderClause: When true, the database supportsFOR UPDATEselect clauses withORDER BYclauses. -
SupportsLockingWithOuterJoin: When true, the database supportsFOR UPDATEselect clauses with outer join queries. -
SupportsLockingWithSelectRange: When true, the database supportsFOR UPDATEselect clauses with queries that select a range of data usingLIMIT,TOPor the database equivalent. Defaults totrue. -
SupportsModOperator: When true, the database supports the modulus operator (%) instead of theMODfunction. Defaults tofalse. -
SupportsMultipleNontransactionalResultSets: When true, a nontransactional connection is capable of having multiple openResultSetinstances. -
SupportsNullDeleteAction: When true, the database supports theSET NULLdelete action on foreign keys. Defaults totrue. -
SupportsNullTableForGetColumns: When true, the database supports passing anullparameter toDatabaseMetaData.getColumnsas an optimization to get information about all the tables. Defaults totrue. -
SupportsNullTableForGetImportedKeys: When true, the database supports passing anullparameter toDatabaseMetaData.getImportedKeysas an optimization to get information about all the tables. Defaults tofalse. -
SupportsNullTableForGetIndexInfo: When true, the database supports passing anullparameter toDatabaseMetaData.getIndexInfoas an optimization to get information about all the tables. Defaults tofalse. -
SupportsNullTableForGetPrimaryKeys: When true, the database supports passing anullparameter toDatabaseMetaData.getPrimaryKeysas an optimization to get information about all the tables. Defaults tofalse. -
SupportsNullUpdateAction: When true, the database supports theSET NULLupdate action on foreign keys. Defaults totrue. -
SupportsQueryTimeout: When true, the JDBC driver supports calls tojava.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 theRESTRICTdelete action on foreign keys. Defaults totrue. -
SupportsRestrictUpdateAction: When true, the database supports theRESTRICTupdate action on foreign keys. Defaults totrue. -
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 supportsSELECTstatements with a pessimistic locking (FOR UPDATE) clause. Defaults totrue. -
SupportsSelectStartIndex: When true, the database can create a select that skips the first N results. -
SupportsSimpleCaseExpression: When true, the database supports the simple form ofCASEexpression:CASE <a> WHEN <b> THEN <c> WHEN <d> THEN <e> ELSE <f> END. When false, the general form ofCASEexpression will be used:CASE WHEN <a> = <b> THEN <c> WHEN <a> = <d> THEN <e> ELSE <f> END. Defaults totrue. -
SupportsSubselect: When true, the database supports subselects in queries. -
SupportsTimestampNanos: When true, the database supports nanoseconds with TIMESTAMP columns. Defaults totrue. -
SupportsUniqueConstraints: When true, the database supports unique constraints. Defaults totrue. -
SupportsXMLColumn: When true, the database supports an XML column type. See XML Column Mapping for information on using this capability. Defaults tofalse. -
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 tonull. -
tableLengthIncludesSchema: Whether the max length for a table name includes the table’s schema. Defaults tofalse. -
TableTypes: Comma-separated list of table types to use when looking for tables during schema reflection, as defined in thejava.sql.DatabaseMetaData.getTableInfoJDBC method. An example is:"TABLE,VIEW,ALIAS". Defaults to"TABLE". -
TimeTypeName: The overridden default column type forjava.sql.Types.TIME. This is used only when the schema is generated by themappingtool. -
TimestampTypeName: The overridden default column type forjava.sql.Types.TIMESTAMP. This is used only when the schema is generated by themappingtool. -
TinyintTypeName: The overridden default column type forjava.sql.Types.TINYINT. This is used only when the schema is generated by themappingtool. -
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: Whentrue, the resulting String fromResultSet.getStringwill be trimmed of trailing white space. Defaults tofalse. -
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 useDatabaseMetaData.getBestRowIdentifierto obtain information about primary keys, rather thanDatabaseMetaData.getPrimaryKeys. -
UseGetBytesForBlobs: When true,ResultSet.getByteswill be used to obtain blob data rather thanResultSet.getBinaryStream. -
UseGetObjectForBlobs: When true,ResultSet.getObjectwill be used to obtain blob data rather thanResultSet.getBinaryStream. -
UseGetStringForClobs: When true,ResultSet.getStringwill be used to obtain clob data rather thanResultSet.getCharacterStream. -
UseJDBC4SetBinaryStream: When true, an attempt will be made to obtain a JDBC 4.0 version ofPreparedStatement.setBinaryStream. When false, asetBinaryStreamis 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 ofsetBinaryStreamwill 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 tofalse) that OpenJPA should not use theCACHEclause when creating a native sequence; instead theINCREMENT BYclause 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: Iffalse, then avoid including the schema name in table name references. Defaults totrue. -
UseSetBytesForBlobs: When true,PreparedStatement.setByteswill be used to set blob data, rather thanPreparedStatement.setBinaryStream. -
UseSetStringForClobs: When true,PreparedStatement.setStringwill be used to set clob data, rather thanPreparedStatement.setCharacterStream. -
UseWildCardForCount: When true, the JPQLCOUNTaggregate function will be translated into SQLCOUNT(*)expression if the SQL query does not involve joins. Defaults tofalse. -
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 forjava.sql.Types.VARBINARY. This is used only when the schema is generated by themappingtool. -
VarcharTypeName: The overridden default column type forjava.sql.Types.VARCHAR. This is used only when the schema is generated by themappingtool. -
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 themappingtool. Defaults to"XML".