23.7. Query settings

<table class="tableblock frame-all grid-all spread">
<colgroup>
<col style="width: 20%;">
<col style="width: 20%;">
<col style="width: 60%;">
</colgroup>
<tbody>
<tr>
<td class="tableblock halign-left valign-top">

Property
</td>
<td class="tableblock halign-left valign-top">

Example
</td>
<td class="tableblock halign-left valign-top">

Purpose
</td>
</tr>
<tr>
<td class="tableblock halign-left valign-top">

`hibernate.query.plan_cache_max_size`
</td>
<td class="tableblock halign-left valign-top">

`2048` (default value)
</td>
<td class="tableblock halign-left valign-top"><div><div class="paragraph">

The maximum number of entries including:

</div>
<div class="ulist">
  • HQLQueryPlan
  • FilterQueryPlan
  • NativeSQLQueryPlan </div>

    maintained by QueryPlanCache.

    </div></div></td> </tr>

    hibernate.query.plan_parameter_metadata_max_size </td>

    128 (default value) </td>

    The maximum number of strong references associated with ParameterMetadata maintained by QueryPlanCache. </td> </tr>

    hibernate.order_by.default_null_ordering </td>

    none, first or last </td>

    Defines precedence of null values in ORDER BY clause. Defaults to none which varies between RDBMS implementation. </td> </tr>

    hibernate.discriminator.force_in_select </td>

    true or false (default value) </td>

    For entities which do not explicitly say, should we force discriminators into SQL selects? </td> </tr>

    hibernate.query.substitutions </td>

    true=1,false=0 </td>

    A comma-separated list of token substitutions to use when translating a Hibernate query to SQL. </td> </tr>

    hibernate.query.factory_class </td>

    org.hibernate.hql.internal.ast. ASTQueryTranslatorFactory (default value) or org.hibernate.hql.internal.classic. ClassicQueryTranslatorFactory </td>

    Chooses the HQL parser implementation. </td> </tr>

    hibernate.query.jpaql_strict_compliance </td>

    true or false (default value) </td>

    Map from tokens in Hibernate queries to SQL tokens, such as function or literal names.

    Should we strictly adhere to JPA Query Language (JPQL) syntax, or more broadly support all of Hibernate’s superset (HQL)?

    Setting this to true may cause valid HQL to throw an exception because it violates the JPQL subset. </td> </tr>

    hibernate.query.startup_check </td>

    true (default value) or false </td>

    Should named queries be checked during startup? </td> </tr>

    hibernate.proc.param_null_passing </td>

    true or false (default value) </td>

    Global setting for whether null parameter bindings should be passed to database procedure/function calls as part of ProcedureCall handling. Implicitly Hibernate will not pass the null, the intention being to allow any default argument values to be applied.

    This defines a global setting, which can then be controlled per parameter via org.hibernate.procedure.ParameterRegistration#enablePassingNulls(boolean)

    Values are true (pass the NULLs) or false (do not pass the NULLs). </td> </tr>

    hibernate.jdbc.log.warnings </td>

    true or false </td>

    Enable fetching JDBC statement warning for logging. Default value is given by org.hibernate.dialect.Dialect#isJdbcLogWarningsEnabledByDefault(). </td> </tr>

    hibernate.session_factory.statement_inspector </td>

    A fully-qualified class name, an instance, or a Class object reference </td>

    Names a StatementInspector implementation to be applied to every Session created by the current SessionFactory.

    </div>

    Can reference

    </div>

  • StatementInspector instance

  • StatementInspector implementation {@link Class} reference
  • StatementInspector implementation class name (fully-qualified class name) </div></div></td> </tr>

    Multi-table bulk HQL operations </td> </tr>

    hibernate.hql.bulk_id_strategy </td>

    A fully-qualified class name, an instance, or a Class object reference </td>

    Provide a custom org.hibernate.hql.spi.id.MultiTableBulkIdStrategy implementation for handling multi-table bulk HQL operations. </td> </tr>

    hibernate.hql.bulk_id_strategy.global_temporary.drop_tables </td>

    true or false (default value) </td>

    For databases that don’t support local tables, but just global ones, this configuration property allows you to DROP the global tables used for multi-table bulk HQL operations when the SessionFactory or the EntityManagerFactory is closed. </td> </tr>

    hibernate.hql.bulk_id_strategy.persistent.drop_tables </td>

    true or false (default value) </td>

    This configuration property is used by the PersistentTableBulkIdStrategy, that mimics temporary tables for databases which do not support temporary tables. It follows a pattern similar to the ANSI SQL definition of global temporary table using a "session id" column to segment rows from the various sessions.

    This configuration property allows you to DROP the tables used for multi-table bulk HQL operations when the SessionFactory or the EntityManagerFactory is closed. </td> </tr>

    hibernate.hql.bulk_id_strategy.persistent.schema </td>

    Database schema name. By default, the hibernate.default_schema is used. </td>

    This configuration property is used by the PersistentTableBulkIdStrategy, that mimics temporary tables for databases which do not support temporary tables. It follows a pattern similar to the ANSI SQL definition of global temporary table using a "session id" column to segment rows from the various sessions.

    This configuration property defines the database schema used for storing the temporary tables used for bulk HQL operations. </td> </tr>

    hibernate.hql.bulk_id_strategy.persistent.catalog </td>

    Database catalog name. By default, the hibernate.default_catalog is used. </td>

    This configuration property is used by the PersistentTableBulkIdStrategy, that mimics temporary tables for databases which do not support temporary tables. It follows a pattern similar to the ANSI SQL definition of global temporary table using a "session id" column to segment rows from the various sessions.

    This configuration property defines the database catalog used for storing the temporary tables used for bulk HQL operations. </td> </tr>

    hibernate.legacy_limit_handler </td>

    true or false (default value) </td>

    Setting which indicates whether or not to use org.hibernate.dialect.pagination.LimitHandler implementations that sacrifices performance optimizations to allow legacy 4.x limit behavior.

    Legacy 4.x behavior favored performing pagination in-memory by avoiding the use of the offset value, which is overall poor performance. In 5.x, the limit handler behavior favors performance, thus, if the dialect doesn’t support offsets, an exception is thrown instead. </td> </tr> </tbody> </table> </div>

results matching ""

    No results matching ""