| <html><head> |
| <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
| <title>4. Database Support</title><base href="display"><link rel="stylesheet" type="text/css" href="css/docbook.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="manual.html" title="Apache OpenJPA 2.4 User's Guide"><link rel="up" href="ref_guide_dbsetup.html" title="Chapter 4. JDBC"><link rel="prev" href="ref_guide_dbsetup_sqlconn.html" title="3. Runtime Access to DataSource"><link rel="next" href="ref_guide_dbsetup_isolation.html" title="5. Setting the Transaction Isolation"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">4. |
| Database Support |
| </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref_guide_dbsetup_sqlconn.html">Prev</a> </td><th width="60%" align="center">Chapter 4. |
| JDBC |
| </th><td width="20%" align="right"> <a accesskey="n" href="ref_guide_dbsetup_isolation.html">Next</a></td></tr></table><hr></div><div class="section" id="ref_guide_dbsetup_dbsupport"><div class="titlepage"><div><div><h2 class="title" style="clear: both">4. |
| Database Support |
| </h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="ref_guide_dbsetup_dbsupport.html#ref_guide_dbsetup_dbdictprops">4.1. |
| DBDictionary Properties |
| </a></span></dt><dt><span class="section"><a href="ref_guide_dbsetup_dbsupport.html#ref_guide_dbsetup_dbsupport_firebird">4.2. |
| FirebirdDictionary Properties |
| </a></span></dt><dt><span class="section"><a href="ref_guide_dbsetup_dbsupport.html#ref_guide_dbsetup_dbsupport_mysql">4.3. |
| MySQLDictionary Properties |
| </a></span></dt><dt><span class="section"><a href="ref_guide_dbsetup_dbsupport.html#ref_guide_dbsetup_dbsupport_oracle">4.4. |
| OracleDictionary Properties |
| </a></span></dt><dt><span class="section"><a href="ref_guide_dbsetup_dbsupport.html#ref_guide_dbsetup_dbsupport_sybase">4.5. |
| SybaseDictionary Properties |
| </a></span></dt><dt><span class="section"><a href="ref_guide_dbsetup_dbsupport.html#ref_guide_dbsetup_dbsupport_db2">4.6. |
| DB2 Properties |
| </a></span></dt><dt><span class="section"><a href="ref_guide_dbsetup_dbsupport.html#ref_guide_dbsetup_dbsupport_delim_id">4.7. |
| Delimited Identifiers Support |
| </a></span></dt></dl></div> |
| |
| <a class="indexterm" name="d5e9734"></a> |
| <a class="indexterm" name="d5e9736"></a> |
| <p> |
| OpenJPA can take advantage of any JDBC 2.x compliant |
| driver, making almost any major database a candidate for use. See our officially |
| supported database list in <a class="xref" href="supported_databases.html" title="Appendix 2. Supported Databases">Appendix 2, <i> |
| Supported Databases |
| </i></a> for more |
| information. Typically, OpenJPA auto-configures its JDBC behavior and SQL |
| dialect for your database, based on the values of your connection-related |
| configuration properties. |
| </p> |
| <p> |
| If OpenJPA cannot detect what type of database you are using, or if you are |
| using an unsupported database, you will have to tell OpenJPA what |
| <a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/sql/DBDictionary.html" target="_top"> |
| <code class="classname">org.apache.openjpa.jdbc.sql.DBDictionary</code></a> to use. |
| The <code class="classname">DBDictionary</code> abstracts away the differences between |
| databases. You can plug a dictionary into OpenJPA using the |
| <a class="link" href="ref_guide_conf_jdbc.html#openjpa.jdbc.DBDictionary" title="6.2. openjpa.jdbc.DBDictionary"><code class="literal">openjpa.jdbc.DBDictionary |
| </code></a> configuration property. The built-in dictionaries are listed |
| below. If you are using an unsupported database, you may have to write your own |
| <code class="classname">DBDictionary</code> subclass, a simple process. |
| </p> |
| <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> |
| <p> |
| <a class="indexterm" name="d5e9752"></a> |
| <code class="literal">access</code>: Dictionary for Microsoft Access. This is an alias |
| for the |
| <a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/sql/AccessDictionary.html" target="_top"> |
| <code class="classname">org.apache.openjpa.jdbc.sql.AccessDictionary</code></a> |
| class. |
| </p> |
| </li><li class="listitem"> |
| <p> |
| <a class="indexterm" name="d5e9759"></a> |
| <code class="literal">db2</code>: Dictionary for IBM's DB2 database. This is an alias for |
| the <a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/sql/DB2Dictionary.html" target="_top"> |
| <code class="classname">org.apache.openjpa.jdbc.sql.DB2Dictionary</code></a> class. |
| </p> |
| </li><li class="listitem"> |
| <p> |
| <a class="indexterm" name="d5e9766"></a> |
| <code class="literal">derby</code>: Dictionary for the Apache Derby database. This is an |
| alias for the |
| <a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/sql/DerbyDictionary.html" target="_top"> |
| <code class="classname">org.apache.openjpa.jdbc.sql.DerbyDictionary</code> class. |
| </a> |
| </p> |
| </li><li class="listitem"> |
| <p> |
| <a class="indexterm" name="d5e9773"></a> |
| <code class="literal">empress</code>: Dictionary for Empress database This is an alias |
| for the |
| <a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/sql/EmpressDictionary.html" target="_top"> |
| <code class="classname">org.apache.openjpa.jdbc.sql.EmpressDictionary</code></a> |
| class. |
| </p> |
| </li><li class="listitem"> |
| <p> |
| <a class="indexterm" name="d5e9780"></a> |
| <code class="literal">foxpro</code>: Dictionary for Microsoft Visual FoxPro. This is an |
| alias for the |
| <a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/sql/FoxProDictionary.html" target="_top"> |
| <code class="classname">org.apache.openjpa.jdbc.sql.FoxProDictionary</code></a> |
| class. |
| </p> |
| </li><li class="listitem"> |
| <p> |
| <a class="indexterm" name="d5e9787"></a> |
| <code class="literal">h2</code>: Dictionary for the H2 Database Engine. This is an |
| alias for the |
| <a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/sql/H2Dictionary.html" target="_top"> |
| <code class="classname">org.apache.openjpa.jdbc.sql.H2Dictionary</code></a> class. |
| </p> |
| </li><li class="listitem"> |
| <p> |
| <a class="indexterm" name="d5e9794"></a> |
| <code class="literal">hsql</code>: Dictionary for the Hypersonic SQL database. This is an |
| alias for the |
| <a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/sql/HSQLDictionary.html" target="_top"> |
| <code class="classname">org.apache.openjpa.jdbc.sql.HSQLDictionary</code></a> class. |
| </p> |
| </li><li class="listitem"> |
| <p> |
| <a class="indexterm" name="d5e9801"></a> |
| <code class="literal">informix</code>: Dictionary for the Informix database. This is an |
| alias for the |
| <a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/sql/InformixDictionary.html" target="_top"> |
| <code class="classname">org.apache.openjpa.jdbc.sql.InformixDictionary</code></a> |
| class. |
| </p> |
| </li><li class="listitem"> |
| <p> |
| <a class="indexterm" name="d5e9808"></a> |
| <code class="literal">ingres</code>: Dictionary for Ingres. This is an alias for the |
| <a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/sql/IngresDictionary.html" target="_top"> |
| <code class="classname">org.apache.openjpa.jdbc.sql.IngresDictionary</code></a> |
| class. |
| </p> |
| </li><li class="listitem"> |
| <p> |
| <a class="indexterm" name="d5e9815"></a> |
| <code class="literal">jdatastore</code>: Dictionary for Borland JDataStore. This is an |
| alias for the |
| <a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/sql/JDataStoreDictionary.html" target="_top"> |
| <code class="classname">org.apache.openjpa.jdbc.sql.JDataStoreDictionary</code></a> |
| class. |
| </p> |
| </li><li class="listitem"> |
| <p> |
| <a class="indexterm" name="d5e9822"></a> |
| <code class="literal">mysql</code>: Dictionary for the MySQL database. This is an alias |
| for the |
| <a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/sql/MySQLDictionary.html" target="_top"> |
| <code class="classname">org.apache.openjpa.jdbc.sql.MySQLDictionary</code></a> |
| class. |
| </p> |
| </li><li class="listitem"> |
| <p> |
| <a class="indexterm" name="d5e9829"></a> |
| <code class="literal">oracle</code>: Dictionary for Oracle. This is an alias for the |
| <a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/sql/OracleDictionary.html" target="_top"> |
| <code class="classname">org.apache.openjpa.jdbc.sql.OracleDictionary</code></a> |
| class. |
| </p> |
| </li><li class="listitem"> |
| <p> |
| <a class="indexterm" name="d5e9836"></a> |
| <code class="literal">pointbase</code>: Dictionary for Pointbase Embedded database. This |
| is an alias for the |
| <a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/sql/PointbaseDictionary.html" target="_top"> |
| <code class="classname">org.apache.openjpa.jdbc.sql.PointbaseDictionary</code></a> |
| class. |
| </p> |
| </li><li class="listitem"> |
| <p> |
| <a class="indexterm" name="d5e9843"></a> |
| <code class="literal">postgres</code>: Dictionary for PostgreSQL. This is an alias for |
| the <a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/sql/PostgresDictionary.html" target="_top"> |
| <code class="classname">org.apache.openjpa.jdbc.sql.PostgresDictionary</code></a> |
| class. |
| </p> |
| </li><li class="listitem"> |
| <p> |
| <a class="indexterm" name="d5e9850"></a> |
| <code class="literal">soliddb</code>: Dictionary for IBM's SolidDB database. |
| This is an alias for the |
| <a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/sql/SolidDBDictionary.html" target="_top"> |
| <code class="classname">org.apache.openjpa.jdbc.sql.SolidDBDictionary</code></a> |
| class. |
| </p> |
| </li><li class="listitem"> |
| <p> |
| <a class="indexterm" name="d5e9857"></a> |
| <code class="literal">sqlserver</code>: Dictionary for Microsoft's SQL Server database. |
| This is an alias for the |
| <a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/sql/SQLServerDictionary.html" target="_top"> |
| <code class="classname">org.apache.openjpa.jdbc.sql.SQLServerDictionary</code></a> |
| class. |
| </p> |
| </li><li class="listitem"> |
| <p> |
| <a class="indexterm" name="d5e9864"></a> |
| <code class="literal">sybase</code>: Dictionary for Sybase. This is an alias for the |
| <a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/sql/SybaseDictionary.html" target="_top"> |
| <code class="classname">org.apache.openjpa.jdbc.sql.SybaseDictionary</code></a> |
| class. |
| </p> |
| </li></ul></div> |
| <p> |
| The example below demonstrates how to set a dictionary and configure its |
| properties in your configuration file. The <code class="literal">DBDictionary</code> |
| property uses OpenJPA's <a class="link" href="ref_guide_conf_plugins.html" title="4. Plugin Configuration">plugin syntax |
| </a>. |
| </p> |
| <div class="example" id="ref_guide_dbsetup_dbdict"><p class="title"><b>Example 4.7. |
| Specifying a DBDictionary |
| </b></p><div class="example-contents"> |
| |
| <pre class="programlisting"> |
| <property name="openjpa.jdbc.DBDictionary" value="hsql(SimulateLocking=true)"/> |
| </pre> |
| </div></div><br class="example-break"> |
| <div class="section" id="ref_guide_dbsetup_dbdictprops"><div class="titlepage"><div><div><h3 class="title">4.1. |
| DBDictionary Properties |
| </h3></div></div></div> |
| |
| <p> |
| 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 |
| <code class="classname">DBDictionary</code> for an unsupported database. |
| </p> |
| <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem" id="DBDictionary.AllowsAliasInBulkClause"> |
| <p> |
| <a class="indexterm" name="d5e9882"></a> |
| <code class="literal">AllowsAliasInBulkClause</code>: |
| When true, SQL delete and update statements may use table aliases. |
| </p> |
| </li><li class="listitem" id="DBDictionary.ArrayTypeName"> |
| <p> |
| <a class="indexterm" name="d5e9888"></a> |
| <code class="literal">ArrayTypeName</code>: The overridden default column type for |
| <code class="literal">java.sql.Types.ARRAY</code>. This is used only when the schema is |
| generated by the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.AutoAssignClause"> |
| <p> |
| <a class="indexterm" name="d5e9896"></a> |
| <code class="literal">AutoAssignClause</code>: The column definition clause to append to |
| a creation statement. For example, <code class="literal">"AUTO_INCREMENT"</code> 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 |
| <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.AutoAssignTypeName"> |
| <p> |
| <a class="indexterm" name="d5e9905"></a> |
| <a class="indexterm" name="d5e9908"></a> |
| <code class="literal">AutoAssignTypeName</code>: |
| The column type name for auto-increment |
| columns. For example, <code class="literal">"BIGSERIAL"</code> 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 |
| <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.BatchLimit"> |
| <p> |
| <a class="indexterm" name="d5e9917"></a> |
| <code class="literal">BatchLimit</code>: |
| 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. |
| </p> |
| </li><li class="listitem" id="DBDictionary.BigintTypeName"> |
| <p> |
| <a class="indexterm" name="d5e9923"></a> |
| <code class="literal">BigintTypeName</code>: The overridden default column type for |
| <code class="literal">java.sql.Types.BIGINT</code>. This is used only when the schema is |
| generated by the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.BinaryTypeName"> |
| <p> |
| <a class="indexterm" name="d5e9931"></a> |
| <code class="literal">BinaryTypeName</code>: The overridden default column type for |
| <code class="literal">java.sql.Types.BINARY</code>. This is used only when the schema is |
| generated by the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.BitTypeName"> |
| <p> |
| <a class="indexterm" name="d5e9939"></a> |
| <code class="literal">BitTypeName</code>: The overridden default column type for |
| <code class="literal">java.sql.Types.BIT</code>. This is used only when the schema is generated by |
| the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.BlobBufferSize"> |
| <p> |
| <a class="indexterm" name="d5e9947"></a> |
| <code class="literal">BlobBufferSize</code>: This property establishes the buffer size in |
| the <code class="literal">INSERT/UPDATE</code> operations with an |
| <code class="literal">java.io.InputStream</code>. This is only used with OpenJPA's |
| <a class="xref" href="ref_guide_mapping_jpa.html#ref_guide_streamsupport" title="7.11. LOB Streaming">Section 7.11, “ |
| LOB Streaming |
| ”</a>. Defaults to 50000. |
| </p> |
| </li><li class="listitem" id="DBDictionary.BlobTypeName"> |
| <p> |
| <a class="indexterm" name="d5e9956"></a> |
| <a class="indexterm" name="d5e9959"></a> |
| <code class="literal">BlobTypeName</code>: The overridden default column type for |
| <code class="literal">java.sql.Types.BLOB</code>. This is used only when the schema is |
| generated by the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.BooleanRepresentation"> |
| <p> |
| <a class="indexterm" name="d5e9967"></a> |
| <code class="literal">BooleanRepresentation</code>: |
| The overridden default representation for <code class="literal">java.lang.Boolean</code> or |
| <code class="literal">boolean</code> fields in JPA Entities. A |
| <a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/sql/BooleanRepresentation.html" target="_top"> |
| <code class="classname">org.apache.openjpa.jdbc.sql.BooleanRepresentation</code></a> |
| describes how Boolean values in entities get mapped into the database by default. |
| Note that you additionally might need to define the <code class="literal">BooleanTypeName</code> |
| <code class="literal">BitTypeName</code> settings to fit your selected BooleanRepresenation. |
| </p> |
| </li><li class="listitem" id="DBDictionary.BooleanTypeName"> |
| <p> |
| <a class="indexterm" name="d5e9979"></a> |
| <code class="literal">BooleanTypeName</code>: |
| The overridden default column type for |
| <code class="literal">java.sql.Types.BOOLEAN</code>. This is used only when the schema |
| is generated by the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.CastFunction"> |
| <p> |
| <a class="indexterm" name="d5e9987"></a> |
| <code class="literal">CastFunction</code>: |
| The SQL function call to cast a value to another SQL type. |
| Use the tokens <code class="literal">{0}</code> and <code class="literal">{1}</code> to represent |
| the two arguments. The result of the function is convert the |
| <code class="literal">{0}</code> value to a <code class="literal">{1}</code> type. |
| The default is <code class="literal">"CAST({0} AS {1})"</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.CatalogSeparator"> |
| <p> |
| <a class="indexterm" name="d5e9998"></a> |
| <code class="literal">CatalogSeparator</code>: The string the database uses to delimit |
| between the schema name and the table name. This is typically <code class="literal">"." |
| </code>, which is the default. |
| </p> |
| </li><li class="listitem" id="DBDictionary.CharTypeName"> |
| <p> |
| <a class="indexterm" name="d5e10005"></a> |
| <code class="literal">CharTypeName</code>: The overridden default column type for |
| <code class="literal">java.sql.Types.CHAR</code>. This is used only when the schema is |
| generated by the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.CharacterColumnSize"> |
| <p> |
| <a class="indexterm" name="d5e10013"></a> |
| <code class="literal">CharacterColumnSize</code>: The default size of <code class="literal">varchar |
| </code> and <code class="literal">char</code> columns. Typically 255. |
| </p> |
| </li><li class="listitem" id="DBDictionary.ClobBufferSize"> |
| <p> |
| <a class="indexterm" name="d5e10021"></a> |
| <code class="literal">ClobBufferSize</code>: This property establish the buffer size in |
| the <code class="literal">INSERT/UPDATE</code> operations with a |
| <code class="literal">java.io.Reader</code>. This is only used with OpenJPA's |
| <a class="xref" href="ref_guide_mapping_jpa.html#ref_guide_streamsupport" title="7.11. LOB Streaming">Section 7.11, “ |
| LOB Streaming |
| ”</a>. Defaults to 50000. |
| </p> |
| </li><li class="listitem" id="DBDictionary.ClobTypeName"> |
| <p> |
| <a class="indexterm" name="d5e10030"></a> |
| <a class="indexterm" name="d5e10033"></a> |
| <code class="literal">ClobTypeName</code>: The overridden default column type for |
| <code class="literal">java.sql.Types.CLOB</code>. This is used only when the schema is |
| generated by the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.ClosePoolSQL"> |
| <p> |
| <a class="indexterm" name="d5e10041"></a> |
| <code class="literal">ClosePoolSQL</code>: |
| 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 <code class="literal">"SHUTDOWN"</code>, |
| that will cause the embedded database to close cleanly. |
| Defaults to <code class="literal">null</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.ConcatenateFunction"> |
| <p> |
| <a class="indexterm" name="d5e10049"></a> |
| <code class="literal">ConcatenateFunction</code>: |
| The SQL function call or operation to concatenate two strings. |
| Use the tokens <code class="literal">{0}</code> and <code class="literal">{1}</code> to represent |
| the two arguments. The result of the function or operation is to concatenate |
| the <code class="literal">{1}</code> string to the end of the <code class="literal">{0}</code> |
| string. Defaults to <code class="literal">"({0}||{1})"</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.ConstraintNameMode"> |
| <p> |
| <a class="indexterm" name="d5e10060"></a> |
| <code class="literal">ConstraintNameMode</code>: When creating constraints, whether to |
| put the constraint name before the definition (<code class="literal">"before"</code>), |
| just after the constraint type name (<code class="literal">"mid"</code>), or after the |
| constraint definition (<code class="literal">"after"</code>). |
| Defaults to <code class="literal">"before"</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.CreatePrimaryKeys"> |
| <p> |
| <a class="indexterm" name="d5e10070"></a> |
| <code class="literal">CreatePrimaryKeys</code>: When false, do not |
| create database primary keys for identifiers. Defaults to <code class="literal">true |
| </code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.CrossJoinClause"> |
| <p> |
| <a class="indexterm" name="d5e10077"></a> |
| <code class="literal">CrossJoinClause</code>: The clause to use for a cross join |
| (cartesian product). Defaults to <code class="literal">"CROSS JOIN"</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.CurrentDateFunction"> |
| <p> |
| <a class="indexterm" name="d5e10084"></a> |
| <code class="literal">CurrentDateFunction</code>: |
| The SQL function call to obtain the current date from the database. |
| Defaults to <code class="literal">"CURRENT_DATE"</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.CurrentTimeFunction"> |
| <p> |
| <a class="indexterm" name="d5e10091"></a> |
| <code class="literal">CurrentTimeFunction</code>: |
| The SQL function call to obtain the current time from the database. |
| Defaults to <code class="literal">"CURRENT_TIME"</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.CurrentTimestampFunction"> |
| <p> |
| <a class="indexterm" name="d5e10098"></a> |
| <code class="literal">CurrentTimestampFunction</code>: |
| The SQL function call to obtain the current timestamp from the database. |
| Defaults to <code class="literal">"CURRENT_TIMESTAMP"</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.DatePrecision"> |
| <p> |
| <a class="indexterm" name="d5e10105"></a> |
| <code class="literal">DatePrecision</code>: |
| 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: |
| </p> |
| <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"> |
| <p> |
| <code class="literal">DECI</code>: 100000000 |
| </p> |
| </li><li class="listitem"> |
| <p> |
| <code class="literal">CENIT</code>: 10000000 |
| </p> |
| </li><li class="listitem"> |
| <p> |
| <code class="literal">MILLI (default precision)</code>: 1000000 |
| </p> |
| </li><li class="listitem"> |
| <p> |
| <code class="literal">MICRO</code>: 1000 |
| </p> |
| </li><li class="listitem"> |
| <p> |
| <code class="literal">NANO (max precision)</code>: 1 |
| </p> |
| </li></ul></div> |
| </li><li class="listitem" id="DBDictionary.DateMillisecondBehavior"> |
| <p> |
| <a class="indexterm" name="d5e10127"></a> |
| <code class="literal">DateMillisecondBehavior</code>: |
| When retrieving a <code class="literal">Date</code> 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 <code class="literal">Date</code> 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 |
| <code class="literal">DBDictionary.DateMillisecondBehaviors</code>. The options defined in |
| <code class="literal">DBDictionary.DateMillisecondBehaviors</code> are as follows: |
| </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"> |
| <p> |
| <code class="literal">DateMillisecondBehaviors.ROUND</code>: This is the default. The |
| <code class="literal">Date</code> will be rounded to the nearest millisecond, as described above. |
| </p> |
| </li><li class="listitem"> |
| <p> |
| <code class="literal">DateMillisecondBehaviors.DROP</code>: 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 <code class="literal">Date</code> field of the |
| entity. |
| </p> |
| </li><li class="listitem"> |
| <p> |
| <code class="literal">DateMillisecondBehaviors.RETAIN</code>: 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 <code class="literal">Date</code> field of the |
| entity. |
| </p> |
| </li></ul></div><p> |
| </p> |
| </li><li class="listitem" id="DBDictionary.DateTypeName"> |
| <p> |
| <a class="indexterm" name="d5e10150"></a> |
| <code class="literal">DateTypeName</code>: The overridden default column type for |
| <code class="literal">java.sql.Types.DATE</code>. This is used only when the schema is |
| generated by the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.DecimalTypeName"> |
| <p> |
| <a class="indexterm" name="d5e10158"></a> |
| <code class="literal">DecimalTypeName</code>: The overridden default column type for |
| <code class="literal">java.sql.Types.DECIMAL</code>. This is used only when the schema is |
| generated by the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.DelimitedCase"> |
| <p> |
| <a class="indexterm" name="d5e10166"></a> |
| <code class="literal">DelimitedCase</code>: 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: |
| <code class="literal">upper, lower, preserve.</code> |
| </p> |
| </li><li class="listitem" id="DBDictionary.DisableAlterSeqenceIncrementBy"> |
| <p> |
| <a class="indexterm" name="d5e10173"></a> |
| <code class="literal">DisableAlterSeqenceIncrementBy</code>: 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): |
| <code class="literal">ALTER SEQUENCE SEQ_JPASAMPLE INCREMENT BY 1000</code>. 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. |
| </p> |
| </li><li class="listitem" id="DBDictionary.DisableSchemaFactoryColumnTypeErrors"> |
| <p> |
| <a class="indexterm" name="d5e10180"></a> |
| <code class="literal">DisableSchemaFactoryColumnTypeErrors</code>: 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. |
| </p> |
| </li><li class="listitem" id="DBDictionary.DistinctCountColumnSeparator"> |
| <p> |
| <a class="indexterm" name="d5e10186"></a> |
| <code class="literal">DistinctCountColumnSeparator</code>: The string the database uses |
| to delimit between column expressions in a <code class="literal">SELECT COUNT(DISTINCT |
| column-list)</code> clause. Defaults to <code class="literal">null</code> |
| for most databases, meaning that |
| multiple columns in a distinct COUNT clause are not supported. |
| </p> |
| </li><li class="listitem" id="DBDictionary.DistinctTypeName"> |
| <p> |
| <a class="indexterm" name="d5e10194"></a> |
| <code class="literal">DistinctTypeName</code>: The overridden default column type for |
| <code class="literal">java.sql.Types.DISTINCT</code>. This is used only when the schema |
| is generated by the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.DoubleTypeName"> |
| <p> |
| <a class="indexterm" name="d5e10202"></a> |
| <code class="literal">DoubleTypeName</code>: The overridden default column type for |
| <code class="literal">java.sql.Types.DOUBLE</code>. This is used only when the schema is |
| generated by the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.DriverVendor"> |
| <p> |
| <a class="indexterm" name="d5e10210"></a> |
| <code class="literal">DriverVendor</code>: 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 <code class="literal">VENDOR_XXX</code> constants defined in the |
| <code class="classname">DBDictionary</code> Javadoc for available options. |
| </p> |
| </li><li class="listitem" id="DBDictionary.DropTableSQL"> |
| <p> |
| <a class="indexterm" name="d5e10218"></a> |
| <code class="literal">DropTableSQL</code>: |
| The SQL statement used to drop a table. Use the token <code class="literal">{0}</code> |
| as the argument for the table name. |
| Defaults to <code class="literal">"DROP TABLE {0}"</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.FixedSizeTypeNames"> |
| <p> |
| <a class="indexterm" name="d5e10226"></a> |
| <code class="literal">FixedSizeTypeNames</code>: |
| 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 <code class="literal">DATE</code>, <code class="literal">FLOAT</code>, |
| and <code class="literal">INTEGER</code>. |
| 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 <code class="literal">null</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.FloatTypeName"> |
| <p> |
| <a class="indexterm" name="d5e10236"></a> |
| <code class="literal">FloatTypeName</code>: The overridden default column type for |
| <code class="literal">java.sql.Types.FLOAT</code>. This is used only when the schema is |
| generated by the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.ForUpdateClause"> |
| <p> |
| <a class="indexterm" name="d5e10244"></a> |
| <a class="indexterm" name="d5e10247"></a> |
| <code class="literal">ForUpdateClause</code>: The clause to append to <code class="literal">SELECT |
| </code> statements to issue queries that obtain pessimistic locks. Defaults |
| to <code class="literal">"FOR UPDATE"</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.GetStringVal"> |
| <p> |
| <a class="indexterm" name="d5e10255"></a> |
| <a class="indexterm" name="d5e10258"></a> |
| <code class="literal">GetStringVal</code>: |
| A special function to return the value of an XML |
| column in a select statement. For example, Oracle uses |
| <code class="literal">".getClobVal()"</code>, as in |
| <code class="literal">"SELECT t0.xmlcol.getClobVal() FROM xmltab t0"</code>. |
| Defaults to the empty string. |
| </p> |
| </li><li class="listitem" id="DBDictionary.InClauseLimit"> |
| <p> |
| <a class="indexterm" name="d5e10266"></a> |
| <code class="literal">InClauseLimit</code>: |
| The maximum number of elements in an <code class="literal">IN</code> clause. OpenJPA |
| works around cases where the limit is exceeded. Defaults to -1 meaning |
| no limit. |
| </p> |
| </li><li class="listitem" id="DBDictionary.InitializationSQL"> |
| <p> |
| <a class="indexterm" name="d5e10273"></a> |
| <a class="indexterm" name="d5e10276"></a> |
| <code class="literal">InitializationSQL</code>: A piece of SQL to issue against the |
| database whenever a connection is retrieved from the <code class="classname">DataSource |
| </code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.InnerJoinClause"> |
| <p> |
| <a class="indexterm" name="d5e10283"></a> |
| <code class="literal">InnerJoinClause</code>: The clause to use for an inner join. |
| Defaults to <code class="literal">"INNER JOIN"</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.IntegerTypeName"> |
| <p> |
| <a class="indexterm" name="d5e10290"></a> |
| <code class="literal">IntegerTypeName</code>: The overridden default column type for |
| <code class="literal">java.sql.Types.INTEGER</code>. This is used only when the schema is |
| generated by the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.JavaObjectTypeName"> |
| <p> |
| <a class="indexterm" name="d5e10298"></a> |
| <code class="literal">JavaObjectTypeName</code>: The overridden default column type for |
| <code class="literal">java.sql.Types.JAVAOBJECT</code>. This is used only when the schema |
| is generated by the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.JoinSyntax"> |
| <p> |
| <a class="indexterm" name="d5e10306"></a> |
| <code class="literal">JoinSyntax</code>: The SQL join syntax to use in select statements. |
| See <a class="xref" href="ref_guide_dbsetup_sql92.html" title="6. Setting the SQL Join Syntax">Section 6, “ |
| Setting the SQL Join Syntax |
| ”</a>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.LastGeneratedKeyQuery"> |
| <p> |
| <a class="indexterm" name="d5e10313"></a> |
| <code class="literal">LastGeneratedKeyQuery</code>: The query to issue to obtain the last |
| automatically generated key for an auto-increment column. For example, |
| <code class="literal">"SELECT LAST_INSERT_ID()"</code> for MySQL. This property is set |
| automatically in the dictionary, and should not need to be overridden. |
| If <code class="literal">SupportsGetGeneratedKeys</code> is true, the query will not |
| be issued but a more efficient JDBC 3.0 mechanism for obtaining generated |
| keys will be used instead. |
| </p> |
| </li><li class="listitem" id="DBDicationary.LeadingDelimiter"> |
| <p> |
| <a class="indexterm" name="d5e10322"></a> |
| <code class="literal">LeadingDelimiter</code>: The characters to use as the leading delimiter |
| for a delimited identifier. The default value is a double quote, |
| <code class="literal">(")</code>. See |
| <a class="xref" href="ref_guide_dbsetup_dbsupport.html#ref_guide_dbsetup_dbsupport_delim_id" title="4.7. Delimited Identifiers Support">Section 4.7, “ |
| Delimited Identifiers Support |
| ”</a> for |
| the default value for some specific databases. |
| </p> |
| </li><li class="listitem" id="DBDictionary.LongVarbinaryTypeName"> |
| <p> |
| <a class="indexterm" name="d5e10330"></a> |
| <code class="literal">LongVarbinaryTypeName</code>: The overridden default column type |
| for <code class="literal">java.sql.Types.LONGVARBINARY</code>. This is used only when the |
| schema is generated by the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.LongVarcharTypeName"> |
| <p> |
| <a class="indexterm" name="d5e10338"></a> |
| <code class="literal">LongVarcharTypeName</code>: The overridden default column type for |
| <code class="literal">java.sql.Types.LONGVARCHAR</code>. This is used only when the |
| schema is generated by the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.MaxAutoAssignNameLength"> |
| <p> |
| <a class="indexterm" name="d5e10346"></a> |
| <code class="literal">MaxAutoAssignNameLength</code>: 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. |
| </p> |
| </li><li class="listitem" id="DBDictionary.MaxColumnNameLength"> |
| <p> |
| <a class="indexterm" name="d5e10352"></a> |
| <code class="literal">MaxColumnNameLength</code>: The maximum number of characters in a |
| column name. Defaults to 128. |
| </p> |
| </li><li class="listitem" id="DBDictionary.MaxConstraintNameLength"> |
| <p> |
| <a class="indexterm" name="d5e10358"></a> |
| <code class="literal">MaxConstraintNameLength</code>: The maximum number of characters in |
| a constraint name. Defaults to 128. |
| </p> |
| </li><li class="listitem" id="DBDictionary.MaxEmbeddedBlobSize"> |
| <p> |
| <a class="indexterm" name="d5e10364"></a> |
| <code class="literal">MaxEmbeddedBlobSize</code>: |
| When greater than -1, the maximum size of a <code class="literal">BLOB</code> value |
| that can be sent directly to the database within an insert or update statement. |
| Values whose size is greater than <code class="literal">MaxEmbeddedBlobSize</code> force |
| OpenJPA to work around this limitation. A value of -1 means that there is |
| no limitation. Defaults to -1. |
| </p> |
| </li><li class="listitem" id="DBDictionary.MaxEmbeddedClobSize"> |
| <p> |
| <a class="indexterm" name="d5e10372"></a> |
| <code class="literal">MaxEmbeddedClobSize</code>: |
| When greater than -1, the maximum size of a <code class="literal">CLOB</code> value |
| that can be sent directly to the database within an insert or update statement. |
| Values whose size is greater than <code class="literal">MaxEmbeddedClobSize</code> force |
| OpenJPA to work around this limitation. A value of -1 means that there is |
| no limitation. Defaults to -1. |
| </p> |
| </li><li class="listitem" id="DBDictionary.MaxIndexNameLength"> |
| <p> |
| <a class="indexterm" name="d5e10380"></a> |
| <a class="indexterm" name="d5e10383"></a> |
| <code class="literal">MaxIndexNameLength</code>: The maximum number of characters in an |
| index name. Defaults to 128. |
| </p> |
| </li><li class="listitem" id="DBDictionary.MaxIndexesPerTable"> |
| <p> |
| <a class="indexterm" name="d5e10389"></a> |
| <code class="literal">MaxIndexesPerTable</code>: The maximum number of indexes that can |
| be placed on a single table. Defaults to no limit. |
| </p> |
| </li><li class="listitem" id="DBDictionary.MaxTableNameLength"> |
| <p> |
| <a class="indexterm" name="d5e10395"></a> |
| <code class="literal">MaxTableNameLength</code>: The maximum number of characters in a |
| table name. Defaults to 128. |
| </p> |
| </li><li class="listitem" id="DBDictionary.NameConcatenator"> |
| <p> |
| <a class="indexterm" name="d5e10401"></a> |
| <code class="literal">NameConcatenator</code>: The value used when names are concatenated to |
| create a generated name. The default value is the underscore <code class="literal">"_"</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.NextSequenceQuery"> |
| <p> |
| <a class="indexterm" name="d5e10408"></a> |
| <code class="literal">NextSequenceQuery</code>: A SQL string for obtaining a native |
| sequence value. May use a placeholder of <code class="literal">{0}</code> for the variable |
| sequence name and <code class="literal">{1}</code> for sequence increment. |
| Defaults to a database-appropriate value. For example, |
| <code class="literal">"SELECT {0}.NEXTVAL FROM DUAL"</code> for Oracle database. |
| </p> |
| </li><li class="listitem" id="DBDictionary.NullTypeName"> |
| <p> |
| <a class="indexterm" name="d5e10417"></a> |
| <code class="literal">NullTypeName</code>: The overridden default column type for |
| <code class="literal">java.sql.Types.NULL</code>. This is used only when the schema is |
| generated by the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.NumericTypeName"> |
| <p> |
| <a class="indexterm" name="d5e10425"></a> |
| <code class="literal">NumericTypeName</code>: The overridden default column type for |
| <code class="literal">java.sql.Types.NUMERIC</code>. This is used only when the schema is |
| generated by the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.OtherTypeName"> |
| <p> |
| <a class="indexterm" name="d5e10433"></a> |
| <code class="literal">OtherTypeName</code>: The overridden default column type for |
| <code class="literal">java.sql.Types.OTHER</code>. This is used only when the schema is |
| generated by the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.OuterJoinClause"> |
| <p> |
| <a class="indexterm" name="d5e10441"></a> |
| <code class="literal">OuterJoinClause</code>: The clause to use for an left outer join. |
| Defaults to <code class="literal">"LEFT OUTER JOIN"</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.Platform"> |
| <p> |
| <a class="indexterm" name="d5e10448"></a> |
| <code class="literal">Platform</code>: |
| The name of the database that this dictionary targets. |
| Defaults to <code class="literal">"Generic"</code>, but all dictionaries override this |
| value. |
| </p> |
| </li><li class="listitem" id="DBDictionary.RangePosition"> |
| <p> |
| <a class="indexterm" name="d5e10455"></a> |
| <code class="literal">RangePosition</code>: |
| 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 <code class="classname">DBDictionary</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.RealTypeName"> |
| <p> |
| <a class="indexterm" name="d5e10462"></a> |
| <code class="literal">RealTypeName</code>: The overridden default column type for |
| <code class="literal">java.sql.Types.REAL</code>. This is used only when the schema is |
| generated by the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.RefTypeName"> |
| <p> |
| <a class="indexterm" name="d5e10470"></a> |
| <code class="literal">RefTypeName</code>: The overridden default column type for |
| <code class="literal">java.sql.Types.REF</code>. This is used only when the schema is generated by |
| the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.RequiresAliasForSubselect"> |
| <p> |
| <a class="indexterm" name="d5e10478"></a> |
| <a class="indexterm" name="d5e10481"></a> |
| <code class="literal">RequiresAliasForSubselect</code>: When true, the database |
| requires that subselects in a FROM clause be assigned an alias. |
| </p> |
| </li><li class="listitem" id="DBDictionary.RequiresAutoCommitForMetadata"> |
| <p> |
| <a class="indexterm" name="d5e10488"></a> |
| <code class="literal">RequiresAutoCommitForMetadata</code>: When true, the JDBC driver |
| requires that autocommit be enabled before any schema interrogation operations |
| can take place. |
| </p> |
| </li><li class="listitem" id="DBDictionary.RequiresCastForComparisons"> |
| <p> |
| <a class="indexterm" name="d5e10495"></a> |
| <code class="literal">RequiresCastForComparisons</code>: |
| When true, comparisons of two values of different types or |
| of two literals requires a cast in the generated SQL. |
| Defaults to <code class="literal">false</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.RequiresCastForMathFunctions"> |
| <p> |
| <a class="indexterm" name="d5e10502"></a> |
| <code class="literal">RequiresCastForMathFunctions</code>: |
| When true, math operations on two values of different types or |
| on two literals requires a cast in the generated SQL. |
| Defaults to <code class="literal">false</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.RequiresConditionForCrossJoin"> |
| <p> |
| <a class="indexterm" name="d5e10509"></a> |
| <code class="literal">RequiresConditionForCrossJoin</code>: 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. |
| </p> |
| </li><li class="listitem" id="DBDictionary.RequiresTargetForDelete"> |
| <p> |
| <a class="indexterm" name="d5e10515"></a> |
| <code class="literal">RequiresTargetForDelete</code>: |
| When true, the database requires a target for delete statements. Defaults |
| to <code class="literal">false</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.ReservedWords"> |
| <p> |
| <a class="indexterm" name="d5e10522"></a> |
| <code class="literal">ReservedWords</code>: A comma-separated list of reserved words for |
| this database, beyond the standard SQL92 keywords. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SchemaCase"> |
| <p> |
| <a class="indexterm" name="d5e10528"></a> |
| <code class="literal">SchemaCase</code>: The case to use when querying the database |
| metadata about schema components. Defaults to making all names upper case. |
| Available values are: <code class="literal">upper, lower, preserve</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SearchStringEscape"> |
| <p> |
| <a class="indexterm" name="d5e10536"></a> |
| <code class="literal">SearchStringEscape</code>: |
| The default escape character used when generating SQL <code class="literal">LIKE</code> |
| clauses. The escape character is used to escape the wildcard meaning of the |
| <code class="literal">_</code> and <code class="literal">%</code> characters. |
| Note: since JPQL provides the ability to define the escape character in |
| the query, this setting is primarily used when translating other query |
| languages, such as JDOQL. Defaults to <code class="literal">"\\"</code> |
| (a single backslash in Java speak). |
| </p> |
| </li><li class="listitem" id="DBDictionary.RequiresSearchStringEscapeForLike"> |
| <p> |
| <a class="indexterm" name="d5e10546"></a> |
| <code class="literal">RequiresSearchStringEscapeForLike</code>: |
| When true, the database requires an escape string for queries that use |
| <code class="literal">LIKE</code>. The escape string can be specified using |
| <code class="literal">searchStringEscape</code>. Defaults to <code class="literal">false</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SelectWords"> |
| <p> |
| <a class="indexterm" name="d5e10555"></a> |
| <code class="literal">SelectWords</code>: 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. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SequenceNameSQL"> |
| <p> |
| <a class="indexterm" name="d5e10561"></a> |
| <code class="literal">SequenceNameSQL</code>: |
| Additional phrasing to use with <code class="literal">SequenceSQL</code>. |
| Defaults to <code class="literal">null</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SequenceSQL"> |
| <p> |
| <a class="indexterm" name="d5e10570"></a> |
| <code class="literal">SequenceSQL</code>: |
| 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 <code class="literal">null</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SequenceSchemaSQL"> |
| <p> |
| <a class="indexterm" name="d5e10578"></a> |
| <code class="literal">SequenceSchemaSQL</code>: |
| Additional phrasing to use with <code class="literal">SequenceSQL</code>. |
| Defaults to <code class="literal">null</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SimulateLocking"> |
| <p> |
| <a class="indexterm" name="d5e10587"></a> |
| <code class="literal">SimulateLocking</code>: 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 <code class="literal">true</code> 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 <code class="literal">true</code> means that you do not obtain the semantics |
| of a pessimistic |
| transaction with the database. Defaults to <code class="literal">false</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SmallintTypeName"> |
| <p> |
| <a class="indexterm" name="d5e10596"></a> |
| <code class="literal">SmallintTypeName</code>: The overridden default column type for |
| <code class="literal">java.sql.Types.SMALLINT</code>. This is used only when the schema |
| is generated by the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.StorageLimitationsFatal"> |
| <p> |
| <a class="indexterm" name="d5e10604"></a> |
| <code class="literal">StorageLimitationsFatal</code>: 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. |
| </p> |
| </li><li class="listitem" id="DBDictionary.StoreCharsAsNumbers"> |
| <p> |
| <a class="indexterm" name="d5e10610"></a> |
| <code class="literal">StoreCharsAsNumbers</code>: Set this property to <code class="literal">false |
| </code> to store Java <code class="literal">char</code> fields as <code class="literal">CHAR |
| </code> values rather than numbers. Defaults to <code class="literal">true</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.StoreLargeNumbersAsStrings"> |
| <p> |
| <a class="indexterm" name="d5e10620"></a> |
| <code class="literal">StoreLargeNumbersAsStrings</code>: When true, the dictionary |
| prefers to store Java fields of |
| type <code class="classname">BigInteger</code> and <code class="classname">BigDecimal</code> |
| 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 <code class="literal">false</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.StringLengthFunction"> |
| <p> |
| <a class="indexterm" name="d5e10629"></a> |
| <code class="literal">StringLengthFunction</code>: Name of the SQL function for getting |
| the length of a string. Use the token <code class="literal">{0}</code> to represent the |
| argument. |
| </p> |
| </li><li class="listitem" id="DBDictionary.StructTypeName"> |
| <p> |
| <a class="indexterm" name="d5e10636"></a> |
| <code class="literal">StructTypeName</code>: The overridden default column type for |
| <code class="literal">java.sql.Types.STRUCT</code>. This is used only when the schema is |
| generated by the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SubstringFunctionName"> |
| <p> |
| <a class="indexterm" name="d5e10644"></a> |
| <code class="literal">SubstringFunctionName</code>: Name of the SQL function for getting |
| the substring of a string. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsAlterTableWithAddColumn"> |
| <p> |
| <a class="indexterm" name="d5e10650"></a> |
| <code class="literal">SupportsAlterTableWithAddColumn</code>: When true, the database |
| supports adding a new column in an ALTER TABLE statement. |
| Defaults to <code class="literal">true</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsAlterTableWithDropColumn"> |
| <p> |
| <a class="indexterm" name="d5e10657"></a> |
| <code class="literal">SupportsAlterTableWithDropColumn</code>: When true, the database |
| supports dropping a column in an ALTER TABLE statement. |
| Defaults to <code class="literal">true</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsAutoAssign"> |
| <p> |
| <a class="indexterm" name="d5e10664"></a> |
| <code class="literal">SupportsAutoAssign</code>: |
| 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 <code class="literal">false</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsCascadeDeleteAction"> |
| <p> |
| <a class="indexterm" name="d5e10671"></a> |
| <code class="literal">SupportsCascadeDeleteAction</code>: When true, the database supports |
| the <code class="literal">CASCADE</code> delete action on foreign keys. |
| Defaults to <code class="literal">true</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsCascadeUpdateAction"> |
| <p> |
| <a class="indexterm" name="d5e10679"></a> |
| <code class="literal">SupportsCascadeUpdateAction</code>: |
| When true, the database supports the <code class="literal">CASCADE</code> |
| update action on foreign keys. Defaults to <code class="literal">true</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsComments"> |
| <p> |
| <a class="indexterm" name="d5e10687"></a> |
| <code class="literal">SupportsComments</code>: |
| When true, comments can be associated with the table in the table creation |
| statement. Defaults to <code class="literal">false</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsCorrelatedSubselect"> |
| <p> |
| <a class="indexterm" name="d5e10694"></a> |
| <code class="literal">SupportsCorrelatedSubselect</code>: |
| 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 <code class="literal">true</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsDefaultDeleteAction"> |
| <p> |
| <a class="indexterm" name="d5e10701"></a> |
| <code class="literal">SupportsDefaultDeleteAction</code>: When true, the database supports |
| the <code class="literal">SET DEFAULT</code> delete action on foreign keys. |
| Defaults to <code class="literal">true</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsDefaultUpdateAction"> |
| <p> |
| <a class="indexterm" name="d5e10709"></a> |
| <code class="literal">SupportsDefaultUpdateAction</code>: |
| When true, the database supports the <code class="literal">SET DEFAULT</code> update |
| action on foreign keys. Defaults to <code class="literal">true</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsDeferredConstraints"> |
| <p> |
| <a class="indexterm" name="d5e10717"></a> |
| <code class="literal">SupportsDeferredConstraints</code>: 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 <code class="literal">true</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsDelimitedIdentifiers"> |
| <p> |
| <a class="indexterm" name="d5e10724"></a> |
| <code class="literal">SupportsDelimitedIdentifiers</code>: When true, the database |
| supports delimited identifiers. It defaults to <code class="literal">true</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsForeignKeys"> |
| <p> |
| <a class="indexterm" name="d5e10731"></a> |
| <code class="literal">SupportsForeignKeys</code>: When true, the database supports foreign |
| keys. Defaults to <code class="literal">true</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsForeignKeysComposite"> |
| <p> |
| <a class="indexterm" name="d5e10738"></a> |
| <code class="literal">SupportsForeignKeysComposite</code>: When true, the database supports |
| composite foreign keys. Defaults to <code class="literal">true</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsGetGeneratedKeys"> |
| <p> |
| <a class="indexterm" name="d5e10745"></a> |
| <code class="literal">SupportsGetGeneratedKeys</code>: When true, OpenJPA will use |
| <code class="methodname">java.sql.Statement.getGeneratedKeys</code> method to obtain |
| values of auto-increment columns. When false, a query specified by |
| <code class="literal">LastGeneratedKeyQuery</code> 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 <code class="methodname">java.sql.Statement.getGeneratedKeys</code> |
| method. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsHaving"> |
| <p> |
| <a class="indexterm" name="d5e10755"></a> |
| <code class="literal">SupportsHaving</code>: When true, the database supports HAVING |
| clauses in selects. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsLockingWithDistinctClause"> |
| <p> |
| <a class="indexterm" name="d5e10762"></a> |
| <code class="literal">SupportsLockingWithDistinctClause</code>: When true, the |
| database supports <code class="literal">FOR UPDATE</code> select clauses with |
| <code class="literal">DISTINCT</code> clauses. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsLockingWithInnerJoin"> |
| <p> |
| <a class="indexterm" name="d5e10770"></a> |
| <code class="literal">SupportsLockingWithInnerJoin</code>: When true, the database |
| supports <code class="literal">FOR UPDATE</code> select clauses with inner join queries. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsLockingWithMultipleTables"> |
| <p> |
| <a class="indexterm" name="d5e10777"></a> |
| <code class="literal">SupportsLockingWithMultipleTables</code>: When true, the |
| database supports <code class="literal">FOR UPDATE</code> select clauses that select from |
| multiple tables. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsLockingWithOrderClause"> |
| <p> |
| <a class="indexterm" name="d5e10784"></a> |
| <code class="literal">SupportsLockingWithOrderClause</code>: When true, the database |
| supports <code class="literal">FOR UPDATE</code> select clauses with <code class="literal">ORDER BY |
| </code> clauses. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsLockingWithOuterJoin"> |
| <p> |
| <a class="indexterm" name="d5e10792"></a> |
| <code class="literal">SupportsLockingWithOuterJoin</code>: When true, the database |
| supports <code class="literal">FOR UPDATE</code> select clauses with outer join queries. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsLockingWithSelectRange"> |
| <p> |
| <a class="indexterm" name="d5e10799"></a> |
| <code class="literal">SupportsLockingWithSelectRange</code>: When true, the database |
| supports <code class="literal">FOR UPDATE</code> select clauses with queries that select a |
| range of data using <code class="literal">LIMIT</code>, <code class="literal">TOP</code> or the |
| database equivalent. Defaults to <code class="literal">true</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsModOperator"> |
| <p> |
| <a class="indexterm" name="d5e10809"></a> |
| <code class="literal">SupportsModOperator</code>: |
| When true, the database supports the modulus operator (<code class="literal">%</code>) |
| instead of the <code class="literal">MOD</code> function. |
| Defaults to <code class="literal">false</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsMultipleNontransactionalResultSets"> |
| <p> |
| <code class="literal">SupportsMultipleNontransactionalResultSets</code>: When true, a |
| nontransactional connection is capable of having multiple open |
| <code class="classname">ResultSet</code> instances. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsNullDeleteAction"> |
| <p> |
| <a class="indexterm" name="d5e10822"></a> |
| <code class="literal">SupportsNullDeleteAction</code>: When true, the database supports |
| the <code class="literal">SET NULL</code> delete action on foreign keys. |
| Defaults to <code class="literal">true</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsNullTableForGetColumns"> |
| <p> |
| <a class="indexterm" name="d5e10830"></a> |
| <code class="literal">SupportsNullTableForGetColumns</code>: When true, the database |
| supports passing a <code class="literal">null</code> parameter to <code class="methodname"> |
| DatabaseMetaData.getColumns</code> as an optimization to get information |
| about all the tables. Defaults to <code class="literal">true</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsNullTableForGetImportedKeys"> |
| <p> |
| <a class="indexterm" name="d5e10840"></a> |
| <code class="literal">SupportsNullTableForGetImportedKeys</code>: When true, the |
| database supports passing a <code class="literal">null</code> parameter to <code class="methodname"> |
| DatabaseMetaData.getImportedKeys</code> as an optimization to get |
| information about all the tables. Defaults to <code class="literal">false</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsNullTableForGetIndexInfo"> |
| <p> |
| <a class="indexterm" name="d5e10850"></a> |
| <code class="literal">SupportsNullTableForGetIndexInfo</code>: When true, the database |
| supports passing a <code class="literal">null</code> parameter to <code class="methodname"> |
| DatabaseMetaData.getIndexInfo</code> as an optimization to get information |
| about all the tables. Defaults to <code class="literal">false</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsNullTableForGetPrimaryKeys"> |
| <p> |
| <a class="indexterm" name="d5e10860"></a> |
| <code class="literal">SupportsNullTableForGetPrimaryKeys</code>: When true, the |
| database supports passing a <code class="literal">null</code> parameter to <code class="methodname"> |
| DatabaseMetaData.getPrimaryKeys</code> as an optimization to get |
| information about all the tables. Defaults to <code class="literal">false</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsNullUpdateAction"> |
| <p> |
| <a class="indexterm" name="d5e10870"></a> |
| <code class="literal">SupportsNullUpdateAction</code>: |
| When true, the database supports the <code class="literal">SET NULL</code> update |
| action on foreign keys. Defaults to <code class="literal">true</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsQueryTimeout"> |
| <p> |
| <a class="indexterm" name="d5e10878"></a> |
| <code class="literal">SupportsQueryTimeout</code>: When true, the JDBC driver supports |
| calls to <code class="methodname"> java.sql.Statement.setQueryTimeout</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.AllowQueryTimeoutOnFindUpdate"> |
| <p> |
| <a class="indexterm" name="d5e10886"></a> |
| <code class="literal">AllowQueryTimeoutOnFindUpdate</code>: The JPA Specification defines the |
| javax.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. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsRestrictDeleteAction"> |
| <p> |
| <a class="indexterm" name="d5e10893"></a> |
| <code class="literal">SupportsRestrictDeleteAction</code>: When true, the database |
| supports the <code class="literal">RESTRICT</code> delete action on foreign keys. |
| Defaults to <code class="literal">true</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsRestrictUpdateAction"> |
| <p> |
| <a class="indexterm" name="d5e10901"></a> |
| <code class="literal">SupportsRestrictUpdateAction</code>: |
| When true, the database supports the <code class="literal">RESTRICT</code> update |
| action on foreign keys. Defaults to <code class="literal">true</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsSchemaForGetColumns"> |
| <p> |
| <a class="indexterm" name="d5e10909"></a> |
| <code class="literal">SupportsSchemaForGetColumns</code>: When false, the database |
| driver does not support using the schema name for schema reflection on column |
| names. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsSchemaForGetTables"> |
| <p> |
| <a class="indexterm" name="d5e10916"></a> |
| <code class="literal">SupportsSchemaForGetTables</code>: If false, then the database |
| driver does not support using the schema name for schema reflection on table |
| names. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsSelectEndIndex"> |
| <p> |
| <a class="indexterm" name="d5e10923"></a> |
| <code class="literal">SupportsSelectEndIndex</code>: When true, the database can create a |
| select that is limited to the first N results. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsSelectForUpdate"> |
| <p> |
| <a class="indexterm" name="d5e10930"></a> |
| <code class="literal">SupportsSelectForUpdate</code>: When true, the database supports |
| <code class="literal">SELECT</code> statements with a pessimistic locking |
| (<code class="literal">FOR UPDATE</code>) clause. Defaults to <code class="literal">true</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsSelectStartIndex"> |
| <p> |
| <a class="indexterm" name="d5e10939"></a> |
| <code class="literal">SupportsSelectStartIndex</code>: When true, the database can create a |
| select that skips the first N results. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsSimpleCaseExpression"> |
| <p> |
| <a class="indexterm" name="d5e10946"></a> |
| <code class="literal">SupportsSimpleCaseExpression</code>: When true, the database supports |
| the simple form of <code class="literal">CASE</code> expression: |
| <code class="literal">CASE <a> WHEN <b> THEN <c> WHEN <d> THEN <e> ELSE <f> END</code>. |
| When false, the general form of <code class="literal">CASE</code> expression will be used: |
| <code class="literal">CASE WHEN <a> = <b> THEN <c> WHEN <a> = <d> THEN <e> ELSE <f> END</code>. |
| Defaults to <code class="literal">true</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsSubselect"> |
| <p> |
| <a class="indexterm" name="d5e10957"></a> |
| <a class="indexterm" name="d5e10960"></a> |
| <code class="literal">SupportsSubselect</code>: When true, the database supports subselects |
| in queries. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsTimestampNanos"> |
| <p> |
| <a class="indexterm" name="d5e10967"></a> |
| <code class="literal">SupportsTimestampNanos</code>: When true, the database supports |
| nanoseconds with TIMESTAMP columns. |
| Defaults to <code class="literal">true</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsUniqueConstraints"> |
| <p> |
| <a class="indexterm" name="d5e10973"></a> |
| <code class="literal">SupportsUniqueConstraints</code>: When true, the database supports |
| unique constraints. Defaults to <code class="literal">true</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SupportsXMLColumn"> |
| <p> |
| <a class="indexterm" name="d5e10980"></a> |
| <code class="literal">SupportsXMLColumn</code>: |
| When true, the database supports an XML column type. See |
| <a class="xref" href="ref_guide_mapping_jpa.html#ref_guide_xmlmapping" title="7.10. XML Column Mapping">Section 7.10, “ |
| XML Column Mapping |
| ”</a> |
| for information on using this capability. Defaults to <code class="literal">false</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SystemSchemas"> |
| <p> |
| <a class="indexterm" name="d5e10988"></a> |
| <code class="literal">SystemSchemas</code>: A comma-separated list of schema names that |
| should be ignored. |
| </p> |
| </li><li class="listitem" id="DBDictionary.SystemTables"> |
| <p> |
| <a class="indexterm" name="d5e10995"></a> |
| <code class="literal">SystemTables</code>: A comma-separated list of table names that |
| should be ignored. |
| </p> |
| </li><li class="listitem" id="DBDictionary.TableForUpdateClause"> |
| <p> |
| <a class="indexterm" name="d5e11002"></a> |
| <a class="indexterm" name="d5e11005"></a> |
| <code class="literal">TableForUpdateClause</code>: The clause to append to the end of |
| each table alias in queries that obtain pessimistic locks. |
| Defaults to <code class="literal">null</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.tableLengthIncludesSchema"> |
| <p> |
| <a class="indexterm" name="d5e11012"></a> |
| <code class="literal">tableLengthIncludesSchema</code>: Whether the max length for a table name includes the table's schema. |
| Defaults to <code class="literal">false</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.TableTypes"> |
| <p> |
| <a class="indexterm" name="d5e11019"></a> |
| <code class="literal">TableTypes</code>: Comma-separated list of table types to use when |
| looking for tables during schema reflection, as defined in the <code class="methodname"> |
| java.sql.DatabaseMetaData.getTableInfo</code> JDBC method. An example is: |
| <code class="literal">"TABLE,VIEW,ALIAS"</code>. Defaults to <code class="literal">"TABLE"</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.TimeTypeName"> |
| <p> |
| <a class="indexterm" name="d5e11029"></a> |
| <code class="literal">TimeTypeName</code>: The overridden default column type for |
| <code class="literal">java.sql.Types.TIME</code>. This is used only when the schema is |
| generated by the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.TimestampTypeName"> |
| <p> |
| <a class="indexterm" name="d5e11037"></a> |
| <code class="literal">TimestampTypeName</code>: The overridden default column type for |
| <code class="literal">java.sql.Types.TIMESTAMP</code>. This is used only when the schema |
| is generated by the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.TinyintTypeName"> |
| <p> |
| <a class="indexterm" name="d5e11045"></a> |
| <code class="literal">TinyintTypeName</code>: The overridden default column type for |
| <code class="literal">java.sql.Types.TINYINT</code>. This is used only when the schema is |
| generated by the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.ToLowerCaseFunction"> |
| <p> |
| <a class="indexterm" name="d5e11053"></a> |
| <code class="literal">ToLowerCaseFunction</code>: Name of the SQL function for converting |
| a string to lower case. Use the token <code class="literal">{0}</code> to represent the |
| argument. |
| </p> |
| </li><li class="listitem" id="DBDictionary.ToUpperCaseFunction"> |
| <p> |
| <a class="indexterm" name="d5e11060"></a> |
| <code class="literal">ToUpperCaseFunction</code>: SQL function call for converting a |
| string to upper case. Use the token <code class="literal">{0}</code> to represent the |
| argument. |
| </p> |
| </li><li class="listitem" id="DBDicationary.TrailingDelimiter"> |
| <p> |
| <a class="indexterm" name="d5e11067"></a> |
| <code class="literal">TrailingDelimiter</code>: The characters to use as the trailing delimiter |
| for a delimited identifier. The default value is a double quote, |
| <code class="literal">(")</code>. See |
| <a class="xref" href="ref_guide_dbsetup_dbsupport.html#ref_guide_dbsetup_dbsupport_delim_id" title="4.7. Delimited Identifiers Support">Section 4.7, “ |
| Delimited Identifiers Support |
| ”</a> for |
| the default value for some specific databases. |
| </p> |
| </li><li class="listitem" id="DBDictionary.TrimBothFunction"> |
| <p> |
| <a class="indexterm" name="d5e11075"></a> |
| <code class="literal">TrimBothFunction</code>: |
| 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 <code class="literal">{1}</code> when possible to represent the character, |
| and the token <code class="literal">{0}</code> to represent the string. |
| Defaults to <code class="literal">"TRIM(BOTH {1} FROM {0})"</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.TrimLeadingFunction"> |
| <p> |
| <a class="indexterm" name="d5e11084"></a> |
| <code class="literal">TrimLeadingFunction</code>: |
| 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 <code class="literal">{1}</code> when possible to represent the character, |
| and the token <code class="literal">{0}</code> to represent the string. |
| Defaults to <code class="literal">"TRIM(LEADING {1} FROM {0})"</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.TrimStringColumns"> |
| <p> |
| <a class="indexterm" name="d5e11093"></a> |
| <code class="literal">TrimStringColumns</code>: When <code class="literal">true</code>, the resulting String from |
| <code class="methodname">ResultSet.getString</code> will be trimmed of trailing white space. Defaults |
| to <code class="literal">false</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.TrimTrailingFunction"> |
| <p> |
| <a class="indexterm" name="d5e11102"></a> |
| <code class="literal">TrimTrailingFunction</code>: |
| 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 <code class="literal">{1}</code> when possible to represent the character, |
| and the token <code class="literal">{0}</code> to represent the string. |
| Defaults to <code class="literal">"TRIM(TRAILING {1} FROM {0})"</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.UseGetBestRowIdentifierForPrimaryKeys"> |
| <p> |
| <a class="indexterm" name="d5e11111"></a> |
| <code class="literal">UseGetBestRowIdentifierForPrimaryKeys</code>: When true, |
| metadata queries will use <code class="methodname">DatabaseMetaData.getBestRowIdentifier |
| </code> to obtain information about primary keys, rather than <code class="methodname"> |
| DatabaseMetaData.getPrimaryKeys</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.UseGetBytesForBlobs"> |
| <p> |
| <a class="indexterm" name="d5e11120"></a> |
| <code class="literal">UseGetBytesForBlobs</code>: When true, <code class="methodname"> |
| ResultSet.getBytes</code> will be used to obtain blob data rather than |
| <code class="methodname">ResultSet.getBinaryStream</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.UseGetObjectForBlobs"> |
| <p> |
| <a class="indexterm" name="d5e11128"></a> |
| <code class="literal">UseGetObjectForBlobs</code>: When true, <code class="methodname"> |
| ResultSet.getObject</code> will be used to obtain blob data rather than |
| <code class="methodname">ResultSet.getBinaryStream</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.UseGetStringForClobs"> |
| <p> |
| <a class="indexterm" name="d5e11136"></a> |
| <code class="literal">UseGetStringForClobs</code>: When true, <code class="methodname"> |
| ResultSet.getString</code> will be used to obtain clob data rather than |
| <code class="methodname">ResultSet.getCharacterStream</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.UseJDBC4SetBinaryStream"> |
| <p> |
| <a class="indexterm" name="d5e11144"></a> |
| <code class="literal">UseJDBC4SetBinaryStream</code>: When true, an attempt will be made to obtain |
| a JDBC 4.0 version of <code class="methodname">PreparedStatement.setBinaryStream</code>. |
| When false, a <code class="methodname">setBinaryStream</code> 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 <code class="methodname">setBinaryStream</code> will be used which does not take a length. |
| The default value of this property is true. |
| </p> |
| </li><li class="listitem" id="DBDictionary.UseNativeSequenceCache"> |
| <p> |
| <a class="indexterm" name="d5e11153"></a> |
| <code class="literal">UseNativeSequenceCache</code>: This property was introduced in |
| the 2.1.2 release to indicate (when set to <code class="literal">false</code>) that OpenJPA |
| should not use the <code class="literal">CACHE</code> clause when creating a native sequence; instead |
| the <code class="literal">INCREMENT BY</code> 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. |
| </p> |
| </li><li class="listitem" id="DBDictionary.UseSchemaName"> |
| <p> |
| <a class="indexterm" name="d5e11162"></a> |
| <code class="literal">UseSchemaName</code>: If <code class="literal">false</code>, then avoid |
| including the schema name in table name references. Defaults to <code class="literal">true |
| </code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.UseSetBytesForBlobs"> |
| <p> |
| <a class="indexterm" name="d5e11170"></a> |
| <code class="literal">UseSetBytesForBlobs</code>: When true, <code class="methodname"> |
| PreparedStatement.setBytes</code> will be used to set blob data, rather |
| than <code class="methodname">PreparedStatement.setBinaryStream</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.UseSetStringForClobs"> |
| <p> |
| <a class="indexterm" name="d5e11178"></a> |
| <code class="literal">UseSetStringForClobs</code>: When true, <code class="methodname"> |
| PreparedStatement.setString</code> will be used to set clob data, rather |
| than <code class="methodname">PreparedStatement.setCharacterStream</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.UseWildCardForCount"> |
| <p> |
| <a class="indexterm" name="d5e11186"></a> |
| <code class="literal">UseWildCardForCount</code>: When true, the JPQL <code class="literal">COUNT</code> |
| aggregate function will be translated into SQL <code class="literal">COUNT(*)</code> expression |
| if the SQL query does not involve joins. Defaults to <code class="literal">false</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.ValidationSQL"> |
| <p> |
| <a class="indexterm" name="d5e11195"></a> |
| <a class="indexterm" name="d5e11198"></a> |
| <code class="literal">ValidationSQL</code>: The SQL used to validate that a connection is |
| still in a valid state. For example, <code class="literal">"SELECT SYSDATE FROM DUAL" |
| </code> for Oracle. |
| </p> |
| </li><li class="listitem" id="DBDictionary.VarbinaryTypeName"> |
| <p> |
| <a class="indexterm" name="d5e11205"></a> |
| <code class="literal">VarbinaryTypeName</code>: The overridden default column type for |
| <code class="literal">java.sql.Types.VARBINARY</code>. This is used only when the schema |
| is generated by the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.VarcharTypeName"> |
| <p> |
| <a class="indexterm" name="d5e11213"></a> |
| <code class="literal">VarcharTypeName</code>: The overridden default column type for |
| <code class="literal">java.sql.Types.VARCHAR</code>. This is used only when the schema is |
| generated by the <code class="literal">mappingtool</code>. |
| </p> |
| </li><li class="listitem" id="DBDictionary.XmlTypeName"> |
| <p> |
| <a class="indexterm" name="d5e11221"></a> |
| <code class="literal">XmlTypeName</code>: |
| 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 |
| <code class="literal">mappingtool</code>. Defaults to <code class="literal">"XML"</code>. |
| </p> |
| </li></ul></div> |
| </div> |
| <div class="section" id="ref_guide_dbsetup_dbsupport_firebird"><div class="titlepage"><div><div><h3 class="title">4.2. |
| FirebirdDictionary Properties |
| </h3></div></div></div> |
| |
| <a class="indexterm" name="d5e11229"></a> |
| <p> |
| The <code class="literal">firebird</code> dictionary understands the following additional |
| properties: |
| </p> |
| <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem" id="FirebirdDictionary.FirebirdVersion"> |
| <p> |
| <a class="indexterm" name="d5e11237"></a> |
| <code class="literal">FirebirdVersion</code>: The database version OpenJPA connects to. |
| This property affects the SQL statements executed by OpenJPA. |
| Available values are: 15, 20 and 21 |
| - they indicate Firebird versions 1.5, 2.0 and 2.1 respectively. |
| If not set, the value will be auto-detected. |
| </p> |
| </li><li class="listitem" id="FirebirdDictionary.IndexedVarcharMaxSizeFB15"> |
| <p> |
| <a class="indexterm" name="d5e11243"></a> |
| <code class="literal">IndexedVarcharMaxSizeFB15</code>: Firebird 1.5 imposes |
| tight limits on index size. In particular, an indexed |
| <code class="literal">VARCHAR</code> column size cannot exceed 252. |
| When <a class="link" href="ref_guide_mapping.html#ref_guide_mapping_mappingtool" title="1. Forward Mapping">schema is created</a>, |
| OpenJPA will use this property to reduce the size |
| of indexed <code class="literal">VARCHAR</code> columns. |
| Defaults to 252 but you might want to decrease this value if multi-column |
| indexes are used. If the Firebird version is 2.0 or later or |
| schema creation is not used, this property does not matter. |
| </p> |
| </li><li class="listitem" id="FirebirdDictionary.RangeSyntax"> |
| <p> |
| <a class="indexterm" name="d5e11252"></a> |
| <code class="literal">RangeSyntax</code>: Firebird 2.0 and later support two |
| ways of handling queries that select a range of data: |
| <code class="literal">"FIRST <p> SKIP <q>"</code> and |
| <code class="literal">"ROWS <m> TO <n>"</code>. Earlier versions support only |
| <code class="literal">"FIRST <p> SKIP <q>"</code> syntax. |
| This property determines the syntax to be used. |
| Available values are: |
| <code class="literal">"firstskip"</code> and <code class="literal">"rows"</code>. |
| Defaults to using <code class="literal">"ROWS <m> TO <n>"</code> if the |
| Firebird version is 2.0 or later, and |
| <code class="literal">"FIRST <p> SKIP <q>"</code> otherwise. |
| </p> |
| </li></ul></div> |
| </div> |
| <div class="section" id="ref_guide_dbsetup_dbsupport_mysql"><div class="titlepage"><div><div><h3 class="title">4.3. |
| MySQLDictionary Properties |
| </h3></div></div></div> |
| |
| <a class="indexterm" name="d5e11265"></a> |
| <p> |
| The <code class="literal">mysql</code> dictionary also understands the following |
| properties: |
| </p> |
| <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem" id="MySQLDictionary.DriverDeserializesBlobs"> |
| <p> |
| <a class="indexterm" name="d5e11273"></a> |
| <code class="literal">DriverDeserializesBlobs</code>: Many older MySQL drivers |
| automatically deserialize BLOBs on calls to |
| <code class="methodname">ResultSet.getObject</code>. The |
| <code class="classname">MySQLDictionary</code> overrides the standard <code class="methodname"> |
| DBDictionary.getBlobObject</code> method to take this into account. |
| Defaults to <code class="literal">true</code> if driver version is less than 5.0, |
| <code class="literal">false</code> otherwise. If your driver deserializes |
| automatically, you may want to set this property to <code class="literal">true</code>. |
| </p> |
| </li><li class="listitem" id="MySQLDictionary.TableType"> |
| <p> |
| <a class="indexterm" name="d5e11285"></a> |
| <code class="literal">TableType</code>: The MySQL table type to use when creating tables. |
| Defaults to <code class="literal">"innodb"</code>. |
| </p> |
| </li><li class="listitem" id="MySQLDictionary.UseClobs"> |
| <p> |
| <a class="indexterm" name="d5e11292"></a> |
| <code class="literal">UseClobs</code>: Some older versions of MySQL do not handle CLOBs |
| correctly. To disable CLOB functionality, set this to <code class="literal">false</code>. |
| Defaults to <code class="literal">true</code>. |
| </p> |
| </li><li class="listitem" id="MySQLDictionary.OptimizeMultiTableDeletes"> |
| <p> |
| <a class="indexterm" name="d5e11300"></a> |
| <code class="literal">OptimizeMultiTableDeletes</code>: MySQL as of version 4.0.0 |
| supports multiple tables in <code class="literal">DELETE</code> statements. When |
| this option is set, OpenJPA will use that syntax when doing bulk deletes |
| from multiple tables. This can happen when the |
| <code class="literal">deleteTableContents</code> <code class="literal">SchemaTool</code> |
| action is used. (See <a class="xref" href="ref_guide_schema_schematool.html" title="13. Schema Tool">Section 13, “ |
| Schema Tool |
| ”</a> for |
| more info about <code class="literal">deleteTableContents</code>.) Defaults to |
| <code class="literal">false</code>, since the statement may fail if using InnoDB |
| tables and delete constraints. |
| </p> |
| |
| </li></ul></div> |
| |
| <p> |
| Starting with Connector/J 3.1.7, MySQL supports a variant of the driver |
| <code class="literal">com.mysql.jdbc.ReplicationDriver</code> that automatically sends |
| queries to a read/write master, or a failover or round-robin load balanced set |
| of slaves based on the state of read-only status of the connection. |
| See <a class="ulink" href="http://dev.mysql.com/doc/refman/5.1/en/connector-j-reference-replication-connection.html" target="_top"> |
| MySQL Reference</a> for more details. |
| </p> |
| <p> |
| This replication feature can be used transparently with OpenJPA application by |
| following configuration: |
| </p> |
| <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> |
| <p> |
| <code class="literal">openjpa.ConnectionDriverName: com.mysql.jdbc.ReplicationDriver</code> |
| </p> |
| </li><li class="listitem"> |
| <p> |
| <code class="literal">openjpa.ConnectionFactoryProperties: autoReconnect=true,roundRobinLoadBalance=true</code> |
| </p> |
| <p> |
| OpenJPA will use a read-only connection with replicated database configuration |
| and will automatically switch the connection to a non-readonly mode if the |
| transaction is writing to the database. |
| </p> |
| </li></ul></div> |
| </div> |
| <div class="section" id="ref_guide_dbsetup_dbsupport_oracle"><div class="titlepage"><div><div><h3 class="title">4.4. |
| OracleDictionary Properties |
| </h3></div></div></div> |
| |
| <a class="indexterm" name="d5e11324"></a> |
| <p> |
| The <code class="literal">oracle</code> dictionary understands the following additional |
| properties: |
| </p> |
| <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem" id="OracleDictionary.UseTriggersForAutoAssign"> |
| <p> |
| <a class="indexterm" name="d5e11332"></a> |
| <a class="indexterm" name="d5e11335"></a> |
| <code class="literal">UseTriggersForAutoAssign</code>: When true, OpenJPA will allow |
| simulation of auto-increment columns by the use of Oracle triggers. OpenJPA will |
| assume that the current sequence value from the sequence specified in the |
| <code class="literal">AutoAssignSequenceName</code> parameter will hold the value of the |
| new primary key for rows that have been inserted. For more details on |
| auto-increment support, see <a class="xref" href="ref_guide_pc_oid.html#ref_guide_pc_oid_pkgen_autoinc" title="4.4. Autoassign / Identity Strategy Caveats">Section 4.4, “ |
| Autoassign / Identity Strategy Caveats |
| ”</a> |
| . |
| </p> |
| </li><li class="listitem" id="OracleDictionary.AutoAssignSequenceName"> |
| <p> |
| <a class="indexterm" name="d5e11344"></a> |
| <a class="indexterm" name="d5e11347"></a> |
| <code class="literal">AutoAssignSequenceName</code>: The global name of the sequence that |
| OpenJPA will assume to hold the value of primary key value for rows that use |
| auto-increment. If left unset, OpenJPA will use a sequence named <code class="literal"> |
| "<table name>_<column name>_SEQ"</code>. |
| </p> |
| </li><li class="listitem" id="OracleDictionary.MaxEmbeddedBlobSize"> |
| <p> |
| <a class="indexterm" name="d5e11355"></a> |
| <a class="indexterm" name="d5e11358"></a> |
| <code class="literal">MaxEmbeddedBlobSize</code>: Oracle is unable to persist BLOBs using |
| the embedded update method when BLOBs get over a certain size. The size depends |
| on database configuration, e.g. encoding. This property defines the maximum size |
| BLOB to persist with the embedded method. Defaults to 4000 bytes. |
| </p> |
| </li><li class="listitem" id="OracleDictionary.MaxEmbeddedClobSize"> |
| <p> |
| <a class="indexterm" name="d5e11364"></a> |
| <a class="indexterm" name="d5e11367"></a> |
| <code class="literal">MaxEmbeddedClobSize</code>: Oracle is unable to persist CLOBs using |
| the embedded update method when CLOBs get over a certain size. The size depends |
| on database configuration, e.g. encoding. This property defines the maximum size |
| CLOB to persist with the embedded method. Defaults to 4000 characters. |
| </p> |
| </li><li class="listitem" id="OracleDictionary.SupportsSetClob"> |
| <p> |
| <code class="literal">SupportsSetClob</code>: This property was used in releases previous |
| to OpenJPA 2.2.0 |
| to indicate that OpenJPA should attempt to use a Reader-based JDBC 4.0 method to |
| set CLOB or XML data. It allowed XMLType and CLOB values larger than 4000 bytes |
| to be used. For OpenJPA 2.2.0 and later releases, code was added to allow said |
| functionality by default (see OPENJPA-1691). 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. |
| </p> |
| </li><li class="listitem" id="OracleDictionary.UseSetFormOfUseForUnicode"> |
| <p> |
| <code class="literal">UseSetFormOfUseForUnicode</code>: Prior to Oracle 10i, statements |
| executed against unicode capable columns (the <code class="literal">NCHAR</code>, |
| <code class="literal">NVARCHAR</code>, <code class="literal">NCLOB</code> Oracle types) required |
| special handling to be able to store unicode values. Setting this property to |
| <code class="literal">true</code> (the default) will cause OpenJPA to attempt to detect when the column is |
| one of these types, and if so, will attempt to correctly configure the statement |
| using the <code class="methodname"> OraclePreparedStatement.setFormOfUse</code>. For |
| more details, see the Oracle |
| <a class="ulink" href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14225/ch7progrunicode.htm#i1006858" target="_top"> |
| JDBC Programming with Unicode</a>. Note that this can only work if OpenJPA is able to |
| access the underlying <code class="classname">OraclePreparedStatement</code> instance, |
| which may not be possible when using some third-party datasources. If OpenJPA |
| detects that this is the case, a warning will be logged. |
| </p> |
| </li></ul></div> |
| </div> |
| <div class="section" id="ref_guide_dbsetup_dbsupport_sybase"><div class="titlepage"><div><div><h3 class="title">4.5. |
| SybaseDictionary Properties |
| </h3></div></div></div> |
| |
| <a class="indexterm" name="d5e11386"></a> |
| <p> |
| The <code class="literal">sybase</code> dictionary understands the following additional |
| properties: |
| </p> |
| <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem" id="SybaseDictionary.IgnoreNumericTruncation"> |
| <p> |
| <a class="indexterm" name="d5e11394"></a> |
| <code class="literal">IgnoreNumericTruncation</code>: If true, Sybase will ignore numeric |
| truncation on SQL operations. Otherwise, if numeric truncation is detected, |
| the operation will fail. |
| </p> |
| </li></ul></div> |
| </div> |
| |
| <div class="section" id="ref_guide_dbsetup_dbsupport_db2"><div class="titlepage"><div><div><h3 class="title">4.6. |
| DB2 Properties |
| </h3></div></div></div> |
| |
| <a class="indexterm" name="d5e11400"></a> |
| <p> |
| The <code class="literal">db2</code> dictionary understands the following additional |
| properties: |
| </p> |
| <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem" id="DB2Dictionary.AppendExtendedExceptionText"> |
| <p> |
| <a class="indexterm" name="d5e11408"></a> |
| <code class="literal">AppendExtendedExceptionText</code>: If false, OpenJPA will not call back to the database to |
| get extended exception text. |
| </p> |
| </li><li class="listitem" id="DB2Dictionary.SupportsRowNum"> |
| <p> |
| <a class="indexterm" name="d5e11414"></a> |
| <code class="literal">SupportsRowNum</code>: If true, OpenJPA will use <code class="literal">ROWNUM</code> facility |
| for range based queries that set an offset and/or limit via <code class="literal">setFirstResult()</code> |
| and <code class="literal">setMaxResult()</code> query methods. This property must be set to <code class="literal">true</code> |
| alongwith <span style="color: red"><lietral>SupportsSelectStartIndex</lietral></span> and <span style="color: red"><lietral>SupportsSelectEndIndex</lietral></span>. |
| By default, <code class="literal">SupportsRowNum</code> is set to <code class="literal">false</code>. |
| It is appropriate to set <code class="literal">SupportsRowNum</code> to <code class="literal">true</code> only when |
| DB2 version being used is 9.7 or later. |
| |
| </p> |
| </li></ul></div> |
| |
| </div> |
| <div class="section" id="ref_guide_dbsetup_dbsupport_delim_id"><div class="titlepage"><div><div><h3 class="title">4.7. |
| Delimited Identifiers Support |
| </h3></div></div></div> |
| |
| <p> |
| OpenJPA provides support for delimited identifiers as defined in the JPA 2.0 specification. |
| Identifiers can either be automatically delimited or individually manually |
| delimited. To have OpenJPA automatically delimit identifiers, add the |
| <code class="literal"><delimited-identifiers/></code> tag |
| to the mapping file as documented in the JPA specification. |
| </p> |
| <p> |
| You can manually delimit individual identifiers either in the annotations or in the |
| definitions in the mapping file. To delimit an identifier element in an annotation, |
| surround it with double quotes. In a mapping file, add |
| <code class="literal">&quote;</code> to both the beginning and end of the element. |
| </p> |
| <p> |
| When delimited identifiers has been specified, OpenJPA will delimit SQL identifiers |
| in the generated SQL statements. It will use database-specific delimiters as defined |
| in the appropriate database dictionary. By default, the leading and trailing |
| delimiters are both double quotes, <code class="literal">(")</code>. Different defaults for other |
| dictionaries provided by OpenJPA are in the following table. |
| </p> |
| <div class="table" id="d5e11436"><p class="title"><b>Table 4.1. |
| Default delimiters for delimited identifiers |
| </b></p><div class="table-contents"> |
| |
| <table summary="
 Default delimiters for delimited identifiers
 " border="1"><colgroup><col align="left" class="dict"><col align="left" class="lead"><col align="left" class="trail"></colgroup><thead><tr><th align="left"> |
| Dictionary |
| </th><th align="left"> |
| Leading Delimiter |
| </th><th align="left"> |
| Trailing Delimiter |
| </th></tr></thead><tbody><tr><td align="left"> |
| MySQLDictionary |
| </td><td align="center"> |
| ` |
| </td><td align="center"> |
| ` |
| </td></tr><tr><td align="left"> |
| AccessDictionary |
| </td><td align="center"> |
| [ |
| </td><td align="center"> |
| ] |
| </td></tr></tbody></table> |
| </div></div><br class="table-break"> |
| <p> |
| Some databases support more than one set of delimiters, often based on configuration. |
| If you need values different than the default values, you can set the |
| <a class="link" href="ref_guide_dbsetup_dbsupport.html#DBDicationary.LeadingDelimiter"><code class="literal">LeadingDelimiter</code></a> |
| and the |
| <a class="link" href="ref_guide_dbsetup_dbsupport.html#DBDicationary.TrailingDelimiter"><code class="literal">TrailingDelimiter</code></a> |
| dictionary properties. |
| </p> |
| <p> |
| You can specify whether or not the particular database that you are using supports delimited |
| identifiers by setting the |
| <a class="link" href="ref_guide_dbsetup_dbsupport.html#DBDictionary.SupportsDelimitedIdentifiers"><code class="literal">SupportsDelimitedIdentifiers</code></a> |
| dictionary property. If this value is set to <code class="literal">false</code>, identifiers will not be automatically |
| delimited, even if the <code class="literal"><delimited-identifiers/></code> tag is specified |
| in the mapping file. |
| </p> |
| <p> |
| <code class="literal">Limitation:</code> The <code class="literal">columnDefinition</code> elements in identifiers |
| are not automatically delimited by OpenJPA when using the |
| <code class="literal"><delimited-identifiers/></code> tag |
| in the mapping file. If you want these to be delimited, you must manually delimit them in |
| the annotation or mapping file definitions. |
| </p> |
| </div> |
| |
| </div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ref_guide_dbsetup_sqlconn.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ref_guide_dbsetup.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ref_guide_dbsetup_isolation.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">3. |
| Runtime Access to DataSource |
| </td><td width="20%" align="center"><a accesskey="h" href="manual.html">Home</a></td><td width="40%" align="right" valign="top"> 5. |
| Setting the Transaction Isolation |
| </td></tr></table></div></body></html> |