Interface AvailableSettings
-
- All Known Implementing Classes:
Environment
public interface AvailableSettings
Enumerates the configuration properties supported by Hibernate, including properties defined by the JPA specification.The settings defined here may be specified at configuration time:
- in a configuration file, for example, in
persistence.xml
orhibernate.cfg.xml
, - via
Configuration.setProperty(String, String)
, or - via
StandardServiceRegistryBuilder.applySetting(String, Object)
.
Note that Hibernate does not distinguish between JPA-defined configuration properties and "native" configuration properties. Any property listed here may be used to configure Hibernate no matter what configuration mechanism or bootstrap API is used.
-
-
Field Summary
Fields Modifier and Type Field Description static String
ALLOW_EXTENSIONS_IN_CDI
Controls whether Hibernate can try to create beans other than converters and listeners using CDI.static String
ALLOW_JTA_TRANSACTION_ACCESS
When enabled, allows access to theTransaction
even when using a JTA for transaction management.static String
ALLOW_REFRESH_DETACHED_ENTITY
When enabled, allows calls toEntityManager.refresh(Object)
andSession.refresh(Object)
on a detached entity instance.static String
ALLOW_UPDATE_OUTSIDE_TRANSACTION
When enabled, allows update operations outside a transaction.static String
ARTIFACT_PROCESSING_ORDER
Deprecated, for removal: This API element is subject to removal in a future version.hbm.xml
mappings are no longer supported, making this attribute irrelevantstatic String
AUTO_CLOSE_SESSION
When enabled, specifies that theSession
should be closed automatically at the end of each transaction.static String
AUTO_EVICT_COLLECTION_CACHE
static String
AUTO_SESSION_EVENTS_LISTENER
Defines a defaultSessionEventListener
to be applied to newly-openedSession
s.static String
AUTOCOMMIT
Controls the autocommit mode of JDBC connections obtained from anyConnectionProvider
implementation which respects this setting, which the built-in implementations do, except forDatasourceConnectionProviderImpl
.static String
BATCH_FETCH_STYLE
Deprecated.An appropriate batch-fetch style is selected automaticallystatic String
BATCH_STRATEGY
Specifies a customBatchBuilder
.static String
BATCH_VERSIONED_DATA
When enabled, specifies that versioned data should be included in batching.static String
BEAN_CONTAINER
Identifies aBeanContainer
to be used.static String
BULK_ID_STRATEGY_GLOBAL_TEMPORARY_CREATE_TABLES
Allows creation of global temporary tables at application startup to be disabled.static String
BULK_ID_STRATEGY_GLOBAL_TEMPORARY_DROP_TABLES
Allows dropping of global temporary tables at application shutdown to be disabled.static String
BULK_ID_STRATEGY_LOCAL_TEMPORARY_DROP_TABLES
Allows dropping of local temporary tables at transaction commit to be enabled.static String
BULK_ID_STRATEGY_PERSISTENT_TEMPORARY_CREATE_TABLES
Allows creation of persistent temporary tables at application startup to be disabled.static String
BULK_ID_STRATEGY_PERSISTENT_TEMPORARY_DROP_TABLES
Allows dropping of persistent temporary tables at application shutdown to be disabled.static String
BYTECODE_PROVIDER
Selects a bytecode enhancement library.static String
C3P0_ACQUIRE_INCREMENT
Number of connections acquired when pool is exhaustedstatic String
C3P0_CONFIG_PREFIX
A setting prefix used to indicate settings that target the hibernate-c3p0 integrationstatic String
C3P0_IDLE_TEST_PERIOD
Idle time before a C3P0 pooled connection is validatedstatic String
C3P0_MAX_SIZE
Maximum size of C3P0 connection poolstatic String
C3P0_MAX_STATEMENTS
Maximum size of C3P0 statement cachestatic String
C3P0_MIN_SIZE
Minimum size of C3P0 connection poolstatic String
C3P0_TIMEOUT
Maximum idle time for C3P0 connection poolstatic String
CACHE_KEYS_FACTORY
Deprecated.this is only honored forhibernate-infinispan
static String
CACHE_REGION_FACTORY
TheRegionFactory
implementation, either: an instance ofRegionFactory
, aClass
implementingRegionFactory
, or he name of a class implementingRegionFactory
.static String
CACHE_REGION_PREFIX
TheCacheProvider
region name prefixstatic String
CALLABLE_NAMED_PARAMS_ENABLED
When enabled, specifies that Hibernate should attempt to map parameter names given in aProcedureCall
orStoredProcedureQuery
to named parameters of the JDBCCallableStatement
.static String
CDI_BEAN_MANAGER
Deprecated.UseJAKARTA_CDI_BEAN_MANAGER
insteadstatic String
CFG_XML_FILE
static String
CHECK_NULLABILITY
Enable nullability checking, raises an exception if an attribute marked as not null is null at runtime.static String
CLASS_CACHE_PREFIX
Entity cache configuration properties follow the patternhibernate.classcache.packagename.ClassName usage[, region]
whereusage
is the cache strategy used andregion
the cache region namestatic String
CLASSLOADERS
Specifies acollection
of theClassLoader
instances Hibernate should use for classloading and resource loading.static String
COLLECTION_CACHE_PREFIX
Collection cache configuration properties follow the patternhibernate.collectioncache.packagename.ClassName.role usage[, region]
whereusage
is the cache strategy used andregion
the cache region namestatic String
COLUMN_ORDERING_STRATEGY
Used to specify theColumnOrderingStrategy
class to use.static String
CONNECTION_HANDLING
Specifies how Hibernate should manage JDBC connections in terms of acquisition and release, either: an instance of the enumerationPhysicalConnectionHandlingMode
, or the name of one of its instances.static String
CONNECTION_PREFIX
A prefix for properties specifying arbitrary JDBC connection properties.static String
CONNECTION_PROVIDER
Specifies aConnectionProvider
to use for obtaining JDBC connections, either: an instance ofConnectionProvider
, aClass
representing a class that implementsConnectionProvider
, or the name of a class that implementsConnectionProvider
.static String
CONNECTION_PROVIDER_DISABLES_AUTOCOMMIT
Allows a user to tell Hibernate that the connections we obtain from the configuredConnectionProvider
will already have autocommit disabled when we acquire them from the provider.static String
CREATE_EMPTY_COMPOSITES_ENABLED
Deprecated.It makes no sense at all to enable this at the global level for a persistence unit.static String
CRITERIA_COPY_TREE
When enabled, specifies that queries created throughEntityManager.createQuery(CriteriaQuery)
,EntityManager.createQuery(CriteriaUpdate)
orEntityManager.createQuery(CriteriaDelete)
must create a copy of the passed object such that the resultingQuery
is not affected by any mutations to the original criteria query.static String
CRITERIA_VALUE_HANDLING_MODE
By default, criteria queries use bind parameters for any value passed via the JPA Criteria API.static String
CURRENT_SESSION_CONTEXT_CLASS
Specifies aCurrentSessionContext
for scoping the current session, either:jta
,thread
, ormanaged
, or the name of a class implementingorg.hibernate.context.spi.CurrentSessionContext
.static String
CUSTOM_ENTITY_DIRTINESS_STRATEGY
Setting to identify aCustomEntityDirtinessStrategy
to use.static String
DATASOURCE
Specifies aDataSource
, either: an instance ofDataSource
, or a JNDI name under which to obtain theDataSource
.static String
DEFAULT_BATCH_FETCH_SIZE
Specifies the default batch size for batch fetching.static String
DEFAULT_CACHE_CONCURRENCY_STRATEGY
Specifies theCacheConcurrencyStrategy
to use by default when an entity is marked@Cacheable
, but no concurrency strategy is explicitly specified via theCache
annotation.static String
DEFAULT_CATALOG
A default database catalog name to use for unqualified table namesstatic String
DEFAULT_LIST_SEMANTICS
Specifies theCollectionClassification
to use when Hibernate detects a plural attribute typed asList
with no explicit list index configuration.static String
DEFAULT_NULL_ORDERING
Specifies the default precedence of null values in the HQLORDER BY
clause, eithernone
,first
, orlast
.static String
DEFAULT_SCHEMA
A default database schema (owner) name to use for unqualified table namesstatic String
DELAY_CDI_ACCESS
Used in conjunction with "hibernate.resource.beans.container" when CDI is used.static String
DELAY_ENTITY_LOADER_CREATIONS
Controls how entity loaders are created.static String
DIALECT
Specifies the Hibernate SQL dialect, either an instance ofDialect
, aClass
representing a class that extendsDialect
, or the name of a class that extendsDialect
.static String
DIALECT_DB_MAJOR_VERSION
Deprecated.UseJAKARTA_HBM2DDL_DB_MAJOR_VERSION
insteadstatic String
DIALECT_DB_MINOR_VERSION
Deprecated.UseJAKARTA_HBM2DDL_DB_MINOR_VERSION
insteadstatic String
DIALECT_DB_NAME
Deprecated.UseJAKARTA_HBM2DDL_DB_NAME
insteadstatic String
DIALECT_DB_VERSION
Deprecated.UseJAKARTA_HBM2DDL_DB_VERSION
insteadstatic String
DIALECT_NATIVE_PARAM_MARKERS
Controls whether to use JDBC markers (`?`) or dialect native markers for parameters within preparable SQL statements.static String
DIALECT_RESOLVERS
Specifies additionalDialectResolver
implementations to register with the standardDialectFactory
.static String
DISCARD_PC_ON_CLOSE
When enabled, specifies that the persistent context should be discarded when eitherSharedSessionContract.close()
orEntityManager.close()
is called.static String
DRIVER
Specifies the JDBC driver class.static String
ENABLE_LAZY_LOAD_NO_TRANS
Allows a detached proxy or lazy collection to be fetched even when not associated with an open persistence context, by creating a temporary persistence context when the proxy or collection is accessed.static String
ENABLE_SYNONYMS
If enabled, allows schema update and validation to support synonyms.static String
ENHANCER_ENABLE_ASSOCIATION_MANAGEMENT
Enable association management feature in runtime bytecode enhancementstatic String
ENHANCER_ENABLE_DIRTY_TRACKING
Deprecated, for removal: This API element is subject to removal in a future version.Will be removed without replacement.static String
ENHANCER_ENABLE_LAZY_INITIALIZATION
Deprecated, for removal: This API element is subject to removal in a future version.Will be removed without replacement.static String
EVENT_LISTENER_PREFIX
Event listener configuration properties follow the patternhibernate.event.listener.eventType packageName.ClassName1, packageName.ClassName2
static String
EXTRA_PHYSICAL_TABLE_TYPES
Specifies a comma-separated list of extra table types, in addition to the default types"TABLE"
and"VIEW"
, to recognize as physical tables when performing schema update, creation and validation.static String
FAIL_ON_PAGINATION_OVER_COLLECTION_FETCH
When pagination is used in combination with afetch join
applied to a collection or many-valued association, the limit must be applied in-memory instead of on the database.static String
FLUSH_BEFORE_COMPLETION
When enabled, specifies that automatic flushing should occur during the JTASynchronization.beforeCompletion()
callback.static String
FLUSH_MODE
Deprecated, for removal: This API element is subject to removal in a future version.There are much better ways to control the flush mode of a session, for example,SessionBuilder.flushMode(org.hibernate.FlushMode)
orSession.setHibernateFlushMode(org.hibernate.FlushMode)
.static String
FORCE_DISCRIMINATOR_IN_SELECTS_BY_DEFAULT
static String
FORMAT_SQL
Enables formatting of SQL logged to the console.static String
GENERATE_STATISTICS
When enabled, specifies that statistics should be collected.static String
GLOBALLY_QUOTED_IDENTIFIERS
When enabled, all database identifiers are quoted.static String
GLOBALLY_QUOTED_IDENTIFIERS_SKIP_COLUMN_DEFINITIONS
AssumingGLOBALLY_QUOTED_IDENTIFIERS
, this allows global quoting to skip column definitions defined byColumn
,JoinColumn
, etc.static String
HBM_XML_FILES
static String
HBM2DDL_AUTO
Setting to performSchemaManagementTool
actions automatically as part of theSessionFactory
lifecycle.static String
HBM2DDL_CHARSET_NAME
The name of the charset used by the schema generation resource.static String
HBM2DDL_CONNECTION
Deprecated.UseJAKARTA_HBM2DDL_CONNECTION
insteadstatic String
HBM2DDL_CREATE_NAMESPACES
Specifies whether to automatically create also the database schema/catalog.static String
HBM2DDL_CREATE_SCHEMAS
Deprecated.UseJAKARTA_HBM2DDL_CREATE_SCHEMAS
insteadstatic String
HBM2DDL_CREATE_SCRIPT_SOURCE
Deprecated.Migrate toJAKARTA_HBM2DDL_CREATE_SCRIPT_SOURCE
static String
HBM2DDL_CREATE_SOURCE
Deprecated.Migrate toJAKARTA_HBM2DDL_CREATE_SOURCE
insteadstatic String
HBM2DDL_DATABASE_ACTION
Deprecated.UseJAKARTA_HBM2DDL_DATABASE_ACTION
insteadstatic String
HBM2DDL_DEFAULT_CONSTRAINT_MODE
Used with theConstraintMode.PROVIDER_DEFAULT
strategy for foreign key mapping.static String
HBM2DDL_DELIMITER
Identifies the delimiter to use to separate schema management statements in script outputs.static String
HBM2DDL_DROP_SCRIPT_SOURCE
Deprecated.Migrate toJAKARTA_HBM2DDL_DROP_SCRIPT_SOURCE
static String
HBM2DDL_DROP_SOURCE
Deprecated.Migrate toJAKARTA_HBM2DDL_DROP_SOURCE
.static String
HBM2DDL_FILTER_PROVIDER
Used to specify theSchemaFilterProvider
to be used by create, drop, migrate and validate operations on the database schema.static String
HBM2DDL_HALT_ON_ERROR
When enabled, specifies that the schema migration tool should halt on any error, terminating the bootstrap process.static String
HBM2DDL_IMPORT_FILES
Specifies a comma-separated list of file names of scripts containing SQL DML statements that should be executed after schema export completes.static String
HBM2DDL_IMPORT_FILES_SQL_EXTRACTOR
TheSqlScriptCommandExtractor
implementation to use for parsing source/import files specified byJAKARTA_HBM2DDL_CREATE_SCRIPT_SOURCE
,JAKARTA_HBM2DDL_DROP_SCRIPT_SOURCE
orHBM2DDL_IMPORT_FILES
.static String
HBM2DDL_JDBC_METADATA_EXTRACTOR_STRATEGY
Setting to choose the strategy used to access the JDBC Metadata.static String
HBM2DDL_LOAD_SCRIPT_SOURCE
Deprecated.UseJAKARTA_HBM2DDL_LOAD_SCRIPT_SOURCE
insteadstatic String
HBM2DDL_SCRIPTS_ACTION
Deprecated.UseJAKARTA_HBM2DDL_SCRIPTS_ACTION
insteadstatic String
HBM2DDL_SCRIPTS_CREATE_APPEND
For cases where the "javax.persistence.schema-generation.scripts.action" value indicates that schema commands should be written to DDL script file, specifies if schema commands should be appended to the end of the file rather than written at the beginning of the file.static String
HBM2DDL_SCRIPTS_CREATE_TARGET
Deprecated.Migrate toJAKARTA_HBM2DDL_SCRIPTS_CREATE_TARGET
static String
HBM2DDL_SCRIPTS_DROP_TARGET
Deprecated.Migrate toJAKARTA_HBM2DDL_SCRIPTS_DROP_TARGET
static String
HIGHLIGHT_SQL
Enables highlighting of SQL logged to the console using ANSI escape codes.static String
ID_DB_STRUCTURE_NAMING_STRATEGY
An implicit naming strategy for database structures (tables, sequences) related to identifier generators.static String
IDENTIFIER_GENERATOR_STRATEGY_PROVIDER
Deprecated.useGenerationTypeStrategyRegistration
insteadstatic String
IGNORE_EXPLICIT_DISCRIMINATOR_COLUMNS_FOR_JOINED_SUBCLASS
The legacy behavior of Hibernate is to not use discriminators for joined inheritance (Hibernate does not need the discriminator).static String
IMMUTABLE_ENTITY_UPDATE_QUERY_HANDLING_MODE
This setting defines howImmutable
entities are handled when executing a bulk update query.static String
IMPLICIT_DISCRIMINATOR_COLUMNS_FOR_JOINED_SUBCLASS
The legacy behavior of Hibernate is to not use discriminators for joined inheritance (Hibernate does not need the discriminator.).static String
IMPLICIT_NAMING_STRATEGY
Used to specify theImplicitNamingStrategy
class to use.static String
IN_CLAUSE_PARAMETER_PADDING
Determines how parameters occurring in a SQLIN
predicate are expanded.static String
INTERCEPTOR
Specifies anInterceptor
implementation associated with theSessionFactory
and propagated to eachSession
created from theSessionFactory
.static String
ISOLATION
Specified the JDBC transaction isolation level.static String
JAKARTA_CDI_BEAN_MANAGER
Used to pass a CDIBeanManager
to Hibernate.static String
JAKARTA_HBM2DDL_CONNECTION
Allows passing a specificConnection
instance to be used bySchemaManagementTool
for the purpose of determining theDialect
, and for performingdatabase actions
if requested.static String
JAKARTA_HBM2DDL_CREATE_SCHEMAS
The JPA variant ofHBM2DDL_CREATE_NAMESPACES
used to specify whether database schemas used in the mapping model should be created on export in addition to creating the tables, sequences, etc.static String
JAKARTA_HBM2DDL_CREATE_SCRIPT_SOURCE
static String
JAKARTA_HBM2DDL_CREATE_SOURCE
Specifies whether schema generation commands for schema creation are to be determined based on object/relational mapping metadata, DDL scripts, or a combination of the two.static String
JAKARTA_HBM2DDL_DATABASE_ACTION
Specifies what type of schema tooling action should be performed against the database specified using either "jakarta.persistence.schema-generation-connection" or the configuredConnectionProvider
for theSessionFactory
.static String
JAKARTA_HBM2DDL_DB_MAJOR_VERSION
Used in conjunction with "jakarta.persistence.database-product-name" for the purpose of determining theDialect
to use when the name does not provide enough detail.static String
JAKARTA_HBM2DDL_DB_MINOR_VERSION
Used in conjunction with "jakarta.persistence.database-product-name" for the purpose of determining theDialect
to use when the name does not provide enough detail.static String
JAKARTA_HBM2DDL_DB_NAME
Specifies the name of the database vendor (as would be reported byDatabaseMetaData.getDatabaseProductName()
) for the purpose of determining theDialect
to use.static String
JAKARTA_HBM2DDL_DB_VERSION
Used in conjunction with "jakarta.persistence.database-product-name" for the purpose of determining theDialect
to use when the name does not provide enough detail.static String
JAKARTA_HBM2DDL_DROP_SCRIPT_SOURCE
static String
JAKARTA_HBM2DDL_DROP_SOURCE
Specifies whether schema generation commands for schema dropping are to be determined based on object/relational mapping metadata, DDL scripts, or a combination of the two.static String
JAKARTA_HBM2DDL_LOAD_SCRIPT_SOURCE
JPA-standard variant ofHBM2DDL_IMPORT_FILES
for specifying a database initialization script to be run as part of schema-exportstatic String
JAKARTA_HBM2DDL_SCRIPTS_ACTION
Specifies what type of schema tooling action should be written to script files.static String
JAKARTA_HBM2DDL_SCRIPTS_CREATE_TARGET
For cases where "jakarta.persistence.schema-generation.scripts.action" indicates that schema creation commands should be written to a script file, this setting specifies either aWriter
configured for output of the DDL script or a string specifying the file URL for the DDL script.static String
JAKARTA_HBM2DDL_SCRIPTS_DROP_TARGET
For cases where "jakarta.persistence.schema-generation.scripts.action" indicates that schema drop commands should be written to a script file, this setting specifies either aWriter
configured for output of the DDL script or a string specifying the file URL for the DDL script.static String
JAKARTA_JDBC_DRIVER
Specifies the name of a JDBC driver to use to connect to the database.static String
JAKARTA_JDBC_PASSWORD
Specifies the password to use when connecting via JDBC.static String
JAKARTA_JDBC_URL
Specifies the JDBC connection URL to use to connect to the database.static String
JAKARTA_JDBC_USER
Specifies the database user to use when connecting via JDBC.static String
JAKARTA_JTA_DATASOURCE
Specifies the JNDI name of a JTADataSource
.static String
JAKARTA_LOCK_SCOPE
Set a default value for the hintSpecHints.HINT_SPEC_LOCK_SCOPE
, used when the hint is not explicitly specified.static String
JAKARTA_LOCK_TIMEOUT
Set a default value for the hintSpecHints.HINT_SPEC_LOCK_TIMEOUT
, used when the hint is not explicitly specified.static String
JAKARTA_NON_JTA_DATASOURCE
Specifies the JNDI name of a non-JTADataSource
.static String
JAKARTA_PERSIST_VALIDATION_GROUP
Used to coordinate with bean validators.static String
JAKARTA_PERSISTENCE_PROVIDER
Specifies a class implementingPersistenceProvider
.static String
JAKARTA_REMOVE_VALIDATION_GROUP
Used to coordinate with bean validators.static String
JAKARTA_SHARED_CACHE_MODE
When enabled, specifies that the second-level cache (which JPA calls the "shared" cache) may be used, as per the rules defined in JPA 2 section 3.1.7.static String
JAKARTA_SHARED_CACHE_RETRIEVE_MODE
Set a default value forSpecHints.HINT_SPEC_CACHE_RETRIEVE_MODE
, used when the hint is not explicitly specified.static String
JAKARTA_SHARED_CACHE_STORE_MODE
Set a default value forSpecHints.HINT_SPEC_CACHE_STORE_MODE
, used when the hint is not explicitly specified.static String
JAKARTA_TRANSACTION_TYPE
Specifies the type of transactions supported by the entity managers.static String
JAKARTA_UPDATE_VALIDATION_GROUP
Used to coordinate with bean validators.static String
JAKARTA_VALIDATION_FACTORY
Used to pass along any discoveredValidatorFactory
.static String
JAKARTA_VALIDATION_MODE
Indicates which form of automatic validation is in effect as per the rules defined in JPA 2 section 3.6.1.1.static String
JDBC_TIME_ZONE
Specifies the time zone to use in the JDBC driver, which is supposed to match the database timezone.static String
JNDI_CLASS
Specifies the JNDIInitialContext
implementation class.static String
JNDI_PREFIX
A prefix for properties specifying arbitrary JNDIInitialContext
properties.static String
JNDI_URL
Specifies the JNDI provider/connection URL.static String
JPA_CACHING_COMPLIANCE
By default, Hibernate uses second-level cache invalidation for entities with secondary tables in order to avoid the possibility of inconsistent cached data in the case where different transactions simultaneously update different table rows corresponding to the same entity instance.static String
JPA_CALLBACKS_ENABLED
Allows JPA callbacks (viaPreUpdate
and friends) to be completely disabled.static String
JPA_CLOSED_COMPLIANCE
JPA specifies that anIllegalStateException
must be thrown byEntityManager.close()
andEntityManagerFactory.close()
if the object has already been closed.static String
JPA_COMPLIANCE
Specifies a default value for allJpaCompliance
flags.static String
JPA_ID_GENERATOR_GLOBAL_SCOPE_COMPLIANCE
Determines whether the scope of any identifier generator name specified viaTableGenerator.name()
orSequenceGenerator.name()
is considered global to the persistence unit, or local to the entity in which identifier generator is defined.static String
JPA_JDBC_DRIVER
Deprecated.UseJAKARTA_JDBC_DRIVER
insteadstatic String
JPA_JDBC_PASSWORD
Deprecated.UseJAKARTA_JDBC_PASSWORD
insteadstatic String
JPA_JDBC_URL
Deprecated.UseJAKARTA_JDBC_URL
insteadstatic String
JPA_JDBC_USER
Deprecated.UseJAKARTA_JDBC_USER
insteadstatic String
JPA_JTA_DATASOURCE
Deprecated.UseJAKARTA_JTA_DATASOURCE
insteadstatic String
JPA_LIST_COMPLIANCE
Deprecated.UseDEFAULT_LIST_SEMANTICS
instead.static String
JPA_LOAD_BY_ID_COMPLIANCE
Determines if an identifier value passed toEntityManager.find(java.lang.Class<T>, java.lang.Object)
orEntityManager.getReference(java.lang.Class<T>, java.lang.Object)
may be coerced to the identifier type declared by the entity.static String
JPA_LOCK_SCOPE
Deprecated.UseJAKARTA_LOCK_SCOPE
insteadstatic String
JPA_LOCK_TIMEOUT
Deprecated.UseJAKARTA_LOCK_TIMEOUT
insteadstatic String
JPA_METAMODEL_POPULATION
Setting that indicates whether to build the JPA types, either: enabled - Do the build disabled - Do not do the build ignoreUnsupported - Do the build, but ignore any non-JPA features that would otherwise result in a failure.static String
JPA_NON_JTA_DATASOURCE
Deprecated.UseJAKARTA_NON_JTA_DATASOURCE
insteadstatic String
JPA_ORDER_BY_MAPPING_COMPLIANCE
JPA specifies that items occurring inOrderBy
lists must be references to entity attributes, whereas Hibernate, by default, allows more complex expressions.static String
JPA_PERSIST_VALIDATION_GROUP
Deprecated.UseJAKARTA_PERSIST_VALIDATION_GROUP
insteadstatic String
JPA_PERSISTENCE_PROVIDER
Deprecated.UseJAKARTA_PERSISTENCE_PROVIDER
insteadstatic String
JPA_PROXY_COMPLIANCE
The JPA specification insists that anEntityNotFoundException
must be thrown whenever an uninitialized entity proxy with no corresponding row in the database is accessed.static String
JPA_QUERY_COMPLIANCE
static String
JPA_REMOVE_VALIDATION_GROUP
Deprecated.UseJAKARTA_REMOVE_VALIDATION_GROUP
insteadstatic String
JPA_SHARED_CACHE_MODE
Deprecated.UseJAKARTA_SHARED_CACHE_MODE
insteadstatic String
JPA_SHARED_CACHE_RETRIEVE_MODE
Deprecated.UseJAKARTA_SHARED_CACHE_RETRIEVE_MODE
insteadstatic String
JPA_SHARED_CACHE_STORE_MODE
Deprecated.UseJAKARTA_SHARED_CACHE_STORE_MODE
insteadstatic String
JPA_TRANSACTION_COMPLIANCE
When enabled, specifies that the HibernateTransaction
should behave according to the semantics defined by the JPA specification for anEntityTransaction
.static String
JPA_TRANSACTION_TYPE
Deprecated.UseJAKARTA_TRANSACTION_TYPE
insteadstatic String
JPA_UPDATE_VALIDATION_GROUP
Deprecated.UseJAKARTA_UPDATE_VALIDATION_GROUP
insteadstatic String
JPA_VALIDATION_FACTORY
Deprecated.UseJAKARTA_VALIDATION_FACTORY
insteadstatic String
JPA_VALIDATION_MODE
Deprecated.UseJAKARTA_VALIDATION_MODE
insteadstatic String
JPAQL_STRICT_COMPLIANCE
static String
JSON_FORMAT_MAPPER
Specifies aFormatMapper
used for JSON serialization and deserialization, either: an instance ofFormatMapper
, aClass
representing a class that implementsFormatMapper
, the name of a class that implementsFormatMapper
, or one of the shorthand constantsjackson
orjsonb
.static String
JTA_CACHE_TM
When enabled, indicates that it is safe to cacheTransactionManager
references.static String
JTA_CACHE_UT
When enabled, indicates that it is safe to cacheUserTransaction
references.static String
JTA_PLATFORM
Specifies theJtaPlatform
implementation to use for integrating with JTA, either: an instance ofJtaPlatform
, or the name of a class that implementsJtaPlatform
.static String
JTA_PLATFORM_RESOLVER
Specifies aJtaPlatformResolver
implementation that should be used to obtain an instance ofJtaPlatform
.static String
JTA_TRACK_BY_THREAD
A transaction can be rolled back by another thread ("tracking by thread") -- not the original application.static String
KEYWORD_AUTO_QUOTING_ENABLED
Specifies whether to automatically quote any names that are deemed SQL keywords.static String
LOADED_CLASSES
static String
LOG_JDBC_WARNINGS
When enabled, specifies that JDBC statement warnings should be logged.static String
LOG_SESSION_METRICS
Controls whether session metrics should be logged for any session in which statistics are being collected.static String
LOG_SLOW_QUERY
Specifies a duration in milliseconds defining the minimum query execution time that characterizes a "slow" query.static String
MAX_FETCH_DEPTH
Specifies the maximum depth of nested outer join fetching.static String
MERGE_ENTITY_COPY_OBSERVER
Setting that specifies how Hibernate will respond when multiple representations of the same persistent entity ("entity copy") are detected while merging.static String
MULTI_TENANT_CONNECTION_PROVIDER
Specifies aMultiTenantConnectionProvider
to use.static String
MULTI_TENANT_IDENTIFIER_RESOLVER
Specifies aCurrentTenantIdentifierResolver
to use, either: an instance ofCurrentTenantIdentifierResolver
, aClass
representing an class that implementsCurrentTenantIdentifierResolver
, or the name of a class that implementsCurrentTenantIdentifierResolver
.static String
NON_CONTEXTUAL_LOB_CREATION
When enabled, specifies that Hibernate should not use contextual LOB creation.static String
ORDER_INSERTS
Enable ordering of insert statements by primary key value, for the purpose of more efficient JDBC batching.static String
ORDER_UPDATES
Enable ordering of update statements by primary key value, for the purpose of more efficient JDBC batchingstatic String
ORM_XML_FILES
static String
PASS
Specifies password to use when connecting via JDBC.static String
PERSISTENCE_UNIT_NAME
Specifies the name of the persistence unit.static String
PHYSICAL_NAMING_STRATEGY
Specifies thePhysicalNamingStrategy
to use.static String
POOL_SIZE
Specifies the maximum number of inactive connections for the built-in connection pool.static String
PREFER_USER_TRANSACTION
When enabled, specifies that theUserTransaction
should be used in preference to theTransactionManager
for JTA transaction management.static String
PREFERRED_BOOLEAN_JDBC_TYPE
Specifies the preferred JDBC type for storing boolean values.static String
PREFERRED_DURATION_JDBC_TYPE
The preferred JDBC type to use for storing duration values.static String
PREFERRED_INSTANT_JDBC_TYPE
Specifies the preferred JDBC type for storing instant values.static String
PREFERRED_POOLED_OPTIMIZER
When a generator specifies an increment-size and an optimizer was not explicitly specified, which of the "pooled" optimizers should be preferred? Can specify an optimizer short name or the name of a class which implementsOptimizer
.static String
PREFERRED_UUID_JDBC_TYPE
The preferred JDBC type to use for storingUUID
values.static String
PROXOOL_CONFIG_PREFIX
A setting prefix used to indicate settings that target the hibernate-proxool integrationstatic String
PROXOOL_EXISTING_POOL
Proxool property to configure the Proxool Provider from an already existing pool (true
/false
)static String
PROXOOL_POOL_ALIAS
Proxool property with the Proxool pool alias to use (Required forPROXOOL_EXISTING_POOL
,PROXOOL_PROPERTIES
, orPROXOOL_XML
)static String
PROXOOL_PROPERTIES
Proxool property to configure the Proxool provider using a properties file (/path/to/proxool.properties
)static String
PROXOOL_XML
Proxool property to configure the Proxool provider using an XML (/path/to/file.xml
)static String
QUERY_CACHE_FACTORY
Specifies theTimestampsCacheFactory
to use.static String
QUERY_MULTI_TABLE_INSERT_STRATEGY
Defines the "global" strategy to use for handling HQL and Criteria insert queries.static String
QUERY_MULTI_TABLE_MUTATION_STRATEGY
Defines the "global" strategy to use for handling HQL and Criteria mutation queries.static String
QUERY_PLAN_CACHE_ENABLED
When enabled, specifies that query plans should be cached.static String
QUERY_PLAN_CACHE_MAX_SIZE
The maximum number of entries in the query plan cache or query interpretation cache.static String
QUERY_PLAN_CACHE_PARAMETER_METADATA_MAX_SIZE
Deprecated.this setting is not currently usedstatic String
QUERY_STARTUP_CHECKING
When enabled, specifies that named queries be checked during startup.static String
QUERY_STATISTICS_MAX_SIZE
This setting controls the number ofQueryStatistics
entries that will be stored by the HibernateStatistics
object.static String
SCANNER
static String
SCANNER_ARCHIVE_INTERPRETER
Specifies anArchiveDescriptorFactory
to use in the scanning process, either: an instance ofArchiveDescriptorFactory
, aClass
representing a class that implementsArchiveDescriptorFactory
, or the name of a class that implementsArchiveDescriptorFactory
.static String
SCANNER_DISCOVERY
Identifies a comma-separated list of values indicating the types of things we should auto-detect during scanning.static String
SCHEMA_MANAGEMENT_TOOL
Specifies theSchemaManagementTool
to use for performing schema management.static String
SEMANTIC_QUERY_PRODUCER
Specifies aHqlTranslator
to use for HQL query translation.static String
SEMANTIC_QUERY_TRANSLATOR
Specifies aSqmTranslatorFactory
to use for HQL query translation.static String
SEQUENCE_INCREMENT_SIZE_MISMATCH_STRATEGY
This setting defines theSequenceMismatchStrategy
used when Hibernate detects a mismatch between a sequence configuration in an entity mapping and its database sequence object counterpart.static String
SESSION_FACTORY_NAME
Setting used to name the HibernateSessionFactory
.static String
SESSION_FACTORY_NAME_IS_JNDI
Does the value defined bySESSION_FACTORY_NAME
represent a JNDI namespace into which theSessionFactory
should be bound and made accessible?static String
SESSION_FACTORY_OBSERVER
Specifies a class which implementsSessionFactoryObserver
and has a constructor with no parameters.static String
SESSION_SCOPED_INTERCEPTOR
Specifies anInterceptor
implementation associated with theSessionFactory
and propagated to eachSession
created from theSessionFactory
.static String
SHOW_SQL
Enables logging of generated SQL to the console.static String
STATEMENT_BATCH_SIZE
Specifies the maximum JDBC batch size.static String
STATEMENT_FETCH_SIZE
Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed.static String
STATEMENT_INSPECTOR
Specifies aStatementInspector
implementation associated with theSessionFactory
, either: an instance ofStatementInspector
, aClass
representing an class that implementsStatementInspector
, or the name of a class that implementsStatementInspector
.static String
STATIC_METAMODEL_POPULATION
Setting that controls whether we seek out JPA "static metamodel" classes and populate them, either: enabled - Do the population disabled - Do not do the population skipUnsupported - Do the population, but ignore any non-JPA features that would otherwise result in the population failing.static String
STORAGE_ENGINE
Specifies the default storage engine for a relational databases that supports multiple storage engines.static String
TABLE_GENERATOR_STORE_LAST_USED
Determines if the identifier value stored in the database table backing a table generator is the last value returned by the identifier generator, or the next value to be returned.static String
TC_CLASSLOADER
Specifies how the thread context class loader must be used for class lookup.static String
TIMEZONE_DEFAULT_STORAGE
Specifies the default strategy for storage of the timezone information for the zoned datetime typesOffsetDateTime
andZonedDateTime
.static String
TRANSACTION_COORDINATOR_STRATEGY
Specify theTransactionCoordinatorBuilder
implementation to use for creating instances ofTransactionCoordinator
, either: an instance ofTransactionCoordinatorBuilder
, aClass
representing a class that implementsTransactionCoordinatorBuilder
, or the name of a class that implementsTransactionCoordinatorBuilder
.static String
TRANSFORM_HBM_XML
Enables processinghbm.xml
mappings by transforming them tomapping.xml
and using that processor.static String
TRANSFORM_HBM_XML_FEATURE_HANDLING
How features in ahbm.xml
file which are not supported for transformation should be handled.static String
UNIQUE_CONSTRAINT_SCHEMA_UPDATE_STRATEGY
Unique columns and unique keys both use unique constraints in most dialects.static String
URL
Specifies the JDBC connection URL.static String
USE_DIRECT_REFERENCE_CACHE_ENTRIES
Enable direct storage of entity references into the second level cache when applicable.static @Remove String
USE_ENTITY_WHERE_CLAUSE_FOR_COLLECTIONS
Deprecated, for removal: This API element is subject to removal in a future version.Originally added as a backwards compatibility flagstatic String
USE_GET_GENERATED_KEYS
Specifies that generated primary keys may be retrieved using the JDBC 3Statement.getGeneratedKeys()
operation.static String
USE_IDENTIFIER_ROLLBACK
When enabled, specifies that the generated identifier of an entity is unset when the entity is deleted.static String
USE_MINIMAL_PUTS
Optimize interaction with the second-level cache to minimize writes, at the cost of an additional read before each write.static String
USE_NATIONALIZED_CHARACTER_DATA
By default, Hibernate maps character data represented byString
s andClob
s to the JDBC typesTypes.VARCHAR
andTypes.CLOB
.static String
USE_QUERY_CACHE
Enable the query cache (disabled by default).static String
USE_REFLECTION_OPTIMIZER
Deprecated, for removal: This API element is subject to removal in a future version.Will be removed without replacement.static String
USE_SCROLLABLE_RESULTSET
When enabled, specifies that JDBC scrollableResultSet
s may be used.static String
USE_SECOND_LEVEL_CACHE
When enabled, specifies that the second-level cache may be used.static String
USE_SQL_COMMENTS
Specifies that comments should be added to the generated SQL.static String
USE_STRUCTURED_CACHE
Enables the use of structured second-level cache entries.static String
USER
Specifies the database user to use when connecting via JDBC.static String
VALIDATE_XML
Whether XML should be validated against their schema as Hibernate reads them.static String
WRAPPER_ARRAY_HANDLING
Configurable control over how to handleByte[]
andCharacter[]
types encountered in the application domain model.static String
XML_FORMAT_MAPPER
Specifies aFormatMapper
used for XML serialization and deserialization, either: an instance ofFormatMapper
, aClass
representing a class that implementsFormatMapper
, the name of a class that implementsFormatMapper
, or one of the shorthand constantsjackson
orjaxb
.static String
XML_MAPPING_ENABLED
When disabled, specifies that processing of XML-based mappings should be skipped.
-
-
-
Field Detail
-
JAKARTA_PERSISTENCE_PROVIDER
static final String JAKARTA_PERSISTENCE_PROVIDER
Specifies a class implementingPersistenceProvider
. Naturally, this should always beHibernatePersistenceProvider
, which is the best damn persistence provider ever. There's no need to explicitly specify this setting when there are no inferior persistence providers floating about.See JPA 2 sections 9.4.3 and 8.2.1.4
- See Also:
- Constant Field Values
-
JAKARTA_TRANSACTION_TYPE
static final String JAKARTA_TRANSACTION_TYPE
Specifies the type of transactions supported by the entity managers. The default depends on whether the program is considered to be executing in a Java SE or EE environment:- For Java SE, the default is
RESOURCE_LOCAL
. - For Java EE, the default is
JTA
.
See JPA 2 sections 9.4.3 and 8.2.1.2
- See Also:
- Constant Field Values
- For Java SE, the default is
-
JAKARTA_JTA_DATASOURCE
static final String JAKARTA_JTA_DATASOURCE
Specifies the JNDI name of a JTADataSource
.See JPA 2 sections 9.4.3 and 8.2.1.5
- See Also:
- Constant Field Values
-
JAKARTA_NON_JTA_DATASOURCE
static final String JAKARTA_NON_JTA_DATASOURCE
Specifies the JNDI name of a non-JTADataSource
.See JPA 2 sections 9.4.3 and 8.2.1.5
- See Also:
- Constant Field Values
-
JAKARTA_JDBC_DRIVER
static final String JAKARTA_JDBC_DRIVER
Specifies the name of a JDBC driver to use to connect to the database.Used in conjunction with
JPA_JDBC_URL
,JPA_JDBC_USER
andJPA_JDBC_PASSWORD
to specify how to connect to the database.When connections are obtained from a
DataSource
, use eitherJPA_JTA_DATASOURCE
orJPA_NON_JTA_DATASOURCE
instead.See section 8.2.1.9
- See Also:
- Constant Field Values
-
JAKARTA_JDBC_URL
static final String JAKARTA_JDBC_URL
Specifies the JDBC connection URL to use to connect to the database.Used in conjunction with
JPA_JDBC_DRIVER
,JPA_JDBC_USER
andJPA_JDBC_PASSWORD
to specify how to connect to the database.When connections are obtained from a
DataSource
, use eitherJPA_JTA_DATASOURCE
orJPA_NON_JTA_DATASOURCE
instead.See section 8.2.1.9
- See Also:
- Constant Field Values
-
JAKARTA_JDBC_USER
static final String JAKARTA_JDBC_USER
Specifies the database user to use when connecting via JDBC.Used in conjunction with
JPA_JDBC_DRIVER
,JPA_JDBC_URL
andJPA_JDBC_PASSWORD
to specify how to connect to the database.See section 8.2.1.9
- See Also:
- Constant Field Values
-
JAKARTA_JDBC_PASSWORD
static final String JAKARTA_JDBC_PASSWORD
Specifies the password to use when connecting via JDBC.Used in conjunction with
JPA_JDBC_DRIVER
,JPA_JDBC_URL
andJPA_JDBC_USER
to specify how to connect to the database.See JPA 2 section 8.2.1.9
- See Also:
- Constant Field Values
-
JAKARTA_SHARED_CACHE_MODE
static final String JAKARTA_SHARED_CACHE_MODE
When enabled, specifies that the second-level cache (which JPA calls the "shared" cache) may be used, as per the rules defined in JPA 2 section 3.1.7.See JPA 2 sections 9.4.3 and 8.2.1.7
- See Also:
SharedCacheMode
, Constant Field Values
-
JAKARTA_SHARED_CACHE_RETRIEVE_MODE
static final String JAKARTA_SHARED_CACHE_RETRIEVE_MODE
Set a default value forSpecHints.HINT_SPEC_CACHE_RETRIEVE_MODE
, used when the hint is not explicitly specified.It does not usually make sense to change the default from
CacheRetrieveMode.USE
.
-
JAKARTA_SHARED_CACHE_STORE_MODE
static final String JAKARTA_SHARED_CACHE_STORE_MODE
Set a default value forSpecHints.HINT_SPEC_CACHE_STORE_MODE
, used when the hint is not explicitly specified.It does not usually make sense to change the default from
CacheStoreMode.USE
.
-
JAKARTA_VALIDATION_MODE
static final String JAKARTA_VALIDATION_MODE
Indicates which form of automatic validation is in effect as per the rules defined in JPA 2 section 3.6.1.1.See JPA 2 sections 9.4.3 and 8.2.1.8
- See Also:
ValidationMode
, Constant Field Values
-
JAKARTA_VALIDATION_FACTORY
static final String JAKARTA_VALIDATION_FACTORY
Used to pass along any discoveredValidatorFactory
.
-
JAKARTA_PERSIST_VALIDATION_GROUP
static final String JAKARTA_PERSIST_VALIDATION_GROUP
Used to coordinate with bean validators.See JPA 2 section 8.2.1.9
- See Also:
- Constant Field Values
-
JAKARTA_UPDATE_VALIDATION_GROUP
static final String JAKARTA_UPDATE_VALIDATION_GROUP
Used to coordinate with bean validators.See JPA 2 section 8.2.1.9
- See Also:
- Constant Field Values
-
JAKARTA_REMOVE_VALIDATION_GROUP
static final String JAKARTA_REMOVE_VALIDATION_GROUP
Used to coordinate with bean validators.See JPA 2 section 8.2.1.9
- See Also:
- Constant Field Values
-
JAKARTA_LOCK_SCOPE
static final String JAKARTA_LOCK_SCOPE
Set a default value for the hintSpecHints.HINT_SPEC_LOCK_SCOPE
, used when the hint is not explicitly specified.See JPA 2 sections 8.2.1.9 and 3.4.4.3
-
JAKARTA_LOCK_TIMEOUT
static final String JAKARTA_LOCK_TIMEOUT
Set a default value for the hintSpecHints.HINT_SPEC_LOCK_TIMEOUT
, used when the hint is not explicitly specified.See JPA 2 sections 8.2.1.9 and 3.4.4.3
-
JAKARTA_CDI_BEAN_MANAGER
static final String JAKARTA_CDI_BEAN_MANAGER
Used to pass a CDIBeanManager
to Hibernate.According to the JPA specification, the
BeanManager
should be passed at boot time and be ready for immediate use at that time. But not all environments can do this (WildFly, for example). To accommodate such environments, Hibernate provides two options:- A proprietary CDI extension SPI (which has been proposed to the CDI
spec group as a standard option) which can be used to provide delayed
BeanManager
access: to use this solution, the reference passed as theBeanManager
during bootstrap should be typed asExtendedBeanManager
. - Delayed access to the
BeanManager
reference: here, Hibernate will not access the reference passed as theBeanManager
during bootstrap until it is first needed. Note, however, that this has the effect of delaying the detection of any deployment problems until after bootstrapping.
BeanManager
, either directly, or viaExtendedBeanManager
. - A proprietary CDI extension SPI (which has been proposed to the CDI
spec group as a standard option) which can be used to provide delayed
-
CLASSLOADERS
static final String CLASSLOADERS
Specifies acollection
of theClassLoader
instances Hibernate should use for classloading and resource loading.- Since:
- 5.0
- See Also:
- Constant Field Values
-
TC_CLASSLOADER
static final String TC_CLASSLOADER
Specifies how the thread context class loader must be used for class lookup.- See Also:
TcclLookupPrecedence
, Constant Field Values
-
JPA_METAMODEL_POPULATION
static final String JPA_METAMODEL_POPULATION
Setting that indicates whether to build the JPA types, either:- enabled - Do the build
- disabled - Do not do the build
- ignoreUnsupported - Do the build, but ignore any non-JPA features that would otherwise result in a failure.
- See Also:
- Constant Field Values
-
STATIC_METAMODEL_POPULATION
static final String STATIC_METAMODEL_POPULATION
Setting that controls whether we seek out JPA "static metamodel" classes and populate them, either:- enabled - Do the population
- disabled - Do not do the population
- skipUnsupported - Do the population, but ignore any non-JPA features that would otherwise result in the population failing.
- See Also:
- Constant Field Values
-
CONNECTION_PROVIDER
static final String CONNECTION_PROVIDER
Specifies aConnectionProvider
to use for obtaining JDBC connections, either:- an instance of
ConnectionProvider
, - a
Class
representing a class that implementsConnectionProvider
, or - the name of a class that implements
ConnectionProvider
.
The term
"class"
appears in the setting name due to legacy reasons; however it can accept instances.- See Also:
- Constant Field Values
- an instance of
-
DRIVER
static final String DRIVER
Specifies the JDBC driver class.- See Also:
Driver
,JAKARTA_JDBC_DRIVER
, Constant Field Values
-
URL
static final String URL
Specifies the JDBC connection URL.- See Also:
JAKARTA_JDBC_URL
, Constant Field Values
-
USER
static final String USER
Specifies the database user to use when connecting via JDBC.Depending on the configured
ConnectionProvider
, the specified username might be used to:- create a JDBC connection using
DriverManager.getConnection(String,java.util.Properties)
orDriver.connect(String,java.util.Properties)
, or - obtain a JDBC connection from a datasource, using
DataSource.getConnection(String, String)
.
- See Also:
PASS
,JAKARTA_JDBC_PASSWORD
, Constant Field Values
- create a JDBC connection using
-
PASS
static final String PASS
Specifies password to use when connecting via JDBC.- See Also:
USER
,JAKARTA_JDBC_USER
, Constant Field Values
-
ISOLATION
static final String ISOLATION
Specified the JDBC transaction isolation level.- See Also:
- Constant Field Values
-
AUTOCOMMIT
static final String AUTOCOMMIT
Controls the autocommit mode of JDBC connections obtained from anyConnectionProvider
implementation which respects this setting, which the built-in implementations do, except forDatasourceConnectionProviderImpl
.- See Also:
- Constant Field Values
-
POOL_SIZE
static final String POOL_SIZE
Specifies the maximum number of inactive connections for the built-in connection pool.- See Also:
- Constant Field Values
-
DATASOURCE
static final String DATASOURCE
Specifies aDataSource
, either:- an instance of
DataSource
, or - a JNDI name under which to obtain the
DataSource
.
For JNDI names, see also
JNDI_CLASS
,JNDI_URL
,JNDI_PREFIX
, etc. - an instance of
-
CONNECTION_PROVIDER_DISABLES_AUTOCOMMIT
static final String CONNECTION_PROVIDER_DISABLES_AUTOCOMMIT
Allows a user to tell Hibernate that the connections we obtain from the configuredConnectionProvider
will already have autocommit disabled when we acquire them from the provider. When we obtain connections with autocommit already disabled, we may circumvent some operations in the interest of performance.By default, Hibernate calls
Connection.setAutoCommit(boolean)
on newly-obtained connections.- Since:
- 5.2.10
- See Also:
SessionFactoryBuilder.applyConnectionProviderDisablesAutoCommit(boolean)
, Constant Field Values
-
CONNECTION_PREFIX
static final String CONNECTION_PREFIX
A prefix for properties specifying arbitrary JDBC connection properties. These properties are simply passed along to the provider when creating a connection.- See Also:
- Constant Field Values
-
JNDI_CLASS
static final String JNDI_CLASS
Specifies the JNDIInitialContext
implementation class.
-
JNDI_URL
static final String JNDI_URL
Specifies the JNDI provider/connection URL.- See Also:
Context.PROVIDER_URL
, Constant Field Values
-
JNDI_PREFIX
static final String JNDI_PREFIX
A prefix for properties specifying arbitrary JNDIInitialContext
properties. These properties are simply passed along to the constructorInitialContext(java.util.Hashtable)
.- See Also:
- Constant Field Values
-
DIALECT
static final String DIALECT
Specifies the Hibernate SQL dialect, either- an instance of
Dialect
, - a
Class
representing a class that extendsDialect
, or - the name of a class that extends
Dialect
.
By default, Hibernate will attempt to automatically determine the dialect from the JDBC URL and JDBC metadata, so this setting is not usually necessary.
- See Also:
Dialect
, Constant Field Values
- an instance of
-
DIALECT_RESOLVERS
static final String DIALECT_RESOLVERS
Specifies additionalDialectResolver
implementations to register with the standardDialectFactory
.- See Also:
- Constant Field Values
-
DIALECT_DB_NAME
@Deprecated static final String DIALECT_DB_NAME
Deprecated.UseJAKARTA_HBM2DDL_DB_NAME
insteadSpecifies the name of the database provider in cases where a connection to the database is not available (usually for generating scripts). In such cases, a value for this setting must be specified.The value of this setting is expected to match the value returned by
DatabaseMetaData.getDatabaseProductName()
for the target database.Additionally, specifying "javax.persistence.database-major-version", and perhaps even "javax.persistence.database-minor-version", may be required for high quality DDL generation.
-
DIALECT_DB_VERSION
@Deprecated static final String DIALECT_DB_VERSION
Deprecated.UseJAKARTA_HBM2DDL_DB_VERSION
insteadSpecifies the name of the database provider in cases where a connection to the database is not available (usually for generating scripts). This value is used to help more precisely determine how to perform schema generation tasks for the underlying database in cases where "javax.persistence.database-product-name" does not provide enough distinction.The value of this setting is expected to match the value returned by
DatabaseMetaData.getDatabaseProductVersion()
for the target database.- See Also:
DIALECT_DB_NAME
, Constant Field Values
-
DIALECT_DB_MAJOR_VERSION
@Deprecated static final String DIALECT_DB_MAJOR_VERSION
Deprecated.UseJAKARTA_HBM2DDL_DB_MAJOR_VERSION
insteadSpecifies the major version of the underlying database, as would be returned byDatabaseMetaData.getDatabaseMajorVersion()
for the target database. This value is used to help more precisely determine how to perform schema generation tasks for the database in cases where "javax.persistence.database-product-name" does not provide enough distinction.
-
DIALECT_DB_MINOR_VERSION
@Deprecated static final String DIALECT_DB_MINOR_VERSION
Deprecated.UseJAKARTA_HBM2DDL_DB_MINOR_VERSION
insteadSpecifies the minor version of the underlying database, as would be returned byDatabaseMetaData.getDatabaseMinorVersion()
for the target database. This setting is used inDialect
resolution.
-
STORAGE_ENGINE
static final String STORAGE_ENGINE
Specifies the default storage engine for a relational databases that supports multiple storage engines. This property must be set either as anEnvironment
variable or JVM System Property, since theDialect
is instantiated before Hibernate property resolution.- Since:
- 5.2.9
- See Also:
- Constant Field Values
-
SCHEMA_MANAGEMENT_TOOL
static final String SCHEMA_MANAGEMENT_TOOL
Specifies theSchemaManagementTool
to use for performing schema management.By default,
HibernateSchemaManagementTool
is used.- Since:
- 5.0
- See Also:
- Constant Field Values
-
TRANSACTION_COORDINATOR_STRATEGY
static final String TRANSACTION_COORDINATOR_STRATEGY
Specify theTransactionCoordinatorBuilder
implementation to use for creating instances ofTransactionCoordinator
, either:- an instance of
TransactionCoordinatorBuilder
, - a
Class
representing a class that implementsTransactionCoordinatorBuilder
, or - the name of a class that implements
TransactionCoordinatorBuilder
.
- Since:
- 5.0
- See Also:
- Constant Field Values
- an instance of
-
JTA_PLATFORM
static final String JTA_PLATFORM
Specifies theJtaPlatform
implementation to use for integrating with JTA, either:- an instance of
JtaPlatform
, or - the name of a class that implements
JtaPlatform
.
- Since:
- 4.0
- See Also:
JTA_PLATFORM_RESOLVER
, Constant Field Values
- an instance of
-
PREFER_USER_TRANSACTION
static final String PREFER_USER_TRANSACTION
When enabled, specifies that theUserTransaction
should be used in preference to theTransactionManager
for JTA transaction management.By default, the
TransactionManager
is preferred.
-
JTA_PLATFORM_RESOLVER
static final String JTA_PLATFORM_RESOLVER
Specifies aJtaPlatformResolver
implementation that should be used to obtain an instance ofJtaPlatform
.- Since:
- 4.3
- See Also:
JTA_PLATFORM
, Constant Field Values
-
JTA_CACHE_TM
static final String JTA_CACHE_TM
When enabled, indicates that it is safe to cacheTransactionManager
references.- Since:
- 4.0
- See Also:
- Constant Field Values
-
JTA_CACHE_UT
static final String JTA_CACHE_UT
When enabled, indicates that it is safe to cacheUserTransaction
references.- Since:
- 4.0
- See Also:
- Constant Field Values
-
DEFAULT_CATALOG
static final String DEFAULT_CATALOG
A default database catalog name to use for unqualified table names
-
DEFAULT_SCHEMA
static final String DEFAULT_SCHEMA
A default database schema (owner) name to use for unqualified table names
-
DEFAULT_CACHE_CONCURRENCY_STRATEGY
static final String DEFAULT_CACHE_CONCURRENCY_STRATEGY
Specifies theCacheConcurrencyStrategy
to use by default when an entity is marked@Cacheable
, but no concurrency strategy is explicitly specified via theCache
annotation.An explicit strategy may be specified using
@Cache(usage=...)
.
-
FORCE_DISCRIMINATOR_IN_SELECTS_BY_DEFAULT
static final String FORCE_DISCRIMINATOR_IN_SELECTS_BY_DEFAULT
-
IMPLICIT_DISCRIMINATOR_COLUMNS_FOR_JOINED_SUBCLASS
static final String IMPLICIT_DISCRIMINATOR_COLUMNS_FOR_JOINED_SUBCLASS
The legacy behavior of Hibernate is to not use discriminators for joined inheritance (Hibernate does not need the discriminator.). However, some JPA providers do need the discriminator for handling joined inheritance, so in the interest of portability this capability has been added to Hibernate.However, we want to make sure that legacy applications continue to work as well. Which puts us in a bind in terms of how to handle "implicit" discriminator mappings. The solution is to assume that the absence of discriminator metadata means to follow the legacy behavior unless this setting is enabled. With this setting enabled, Hibernate will interpret the absence of discriminator metadata as an indication to use the JPA defined defaults for these absent annotations.
See Hibernate Jira issue HHH-6911 for additional background info.
This setting defaults to
false
, meaning that implicit discriminator columns are never inferred to exist for joined inheritance hierarchies.
-
IGNORE_EXPLICIT_DISCRIMINATOR_COLUMNS_FOR_JOINED_SUBCLASS
static final String IGNORE_EXPLICIT_DISCRIMINATOR_COLUMNS_FOR_JOINED_SUBCLASS
The legacy behavior of Hibernate is to not use discriminators for joined inheritance (Hibernate does not need the discriminator). However, some JPA providers do need the discriminator for handling joined inheritance, so in the interest of portability this capability has been added to Hibernate.Existing applications rely (implicitly or explicitly) on Hibernate ignoring any
DiscriminatorColumn
declarations on joined inheritance hierarchies. This setting allows these applications to maintain the legacy behavior of@DiscriminatorColumn
annotations being ignored when paired with joined inheritance.See Hibernate Jira issue HHH-6911 for additional background info.
This setting defaults to
false
, meaning that explicit discriminator columns are never ignored.
-
USE_NATIONALIZED_CHARACTER_DATA
static final String USE_NATIONALIZED_CHARACTER_DATA
By default, Hibernate maps character data represented byString
s andClob
s to the JDBC typesTypes.VARCHAR
andTypes.CLOB
. This setting, when enabled, turns on the use of explicit nationalized character support for mappings involving character data, specifying that the JDBC typesTypes.NVARCHAR
andTypes.NCLOB
should be used instead.This setting is relevant for use with databases with explicit nationalization support, and it is not needed for databases whose native
varchar
andclob
types support Unicode data. (If you're not sure how your database handles Unicode, check out the implementation ofDialect.getNationalizationSupport()
for its SQL dialect.)Enabling this setting has two effects:
- when interacting with JDBC, Hibernate uses operations like
PreparedStatement.setNString(int, String)
PreparedStatement.setNClob(int, java.sql.NClob)
to pass character data, and - when generating DDL, the schema export tool uses
nchar
,nvarchar
, ornclob
as the generated column type when no column type is explicitly specified usingColumn.columnDefinition()
.
This setting is disabled by default, and so Unicode character data may not be persisted correctly for databases with explicit nationalization support.
This is a global setting applying to all mappings associated with a given
SessionFactory
. TheNationalized
annotation may be used to selectively enable nationalized character support for specific columns. - when interacting with JDBC, Hibernate uses operations like
-
SCANNER
static final String SCANNER
-
SCANNER_ARCHIVE_INTERPRETER
static final String SCANNER_ARCHIVE_INTERPRETER
Specifies anArchiveDescriptorFactory
to use in the scanning process, either:- an instance of
ArchiveDescriptorFactory
, - a
Class
representing a class that implementsArchiveDescriptorFactory
, or - the name of a class that implements
ArchiveDescriptorFactory
.
See information on
Scanner
about expected constructor forms. - an instance of
-
SCANNER_DISCOVERY
static final String SCANNER_DISCOVERY
Identifies a comma-separated list of values indicating the types of things we should auto-detect during scanning. Allowable values include:"class"
specifies that.class
files are discovered as managed classes"hbm"
specifies thathbm.xml
files are discovered as mapping files
-
IMPLICIT_NAMING_STRATEGY
static final String IMPLICIT_NAMING_STRATEGY
Used to specify theImplicitNamingStrategy
class to use. The following shortcut names are defined for this setting:"default"
and"jpa"
are an abbreviations forImplicitNamingStrategyJpaCompliantImpl
"legacy-jpa"
is an abbreviation forImplicitNamingStrategyLegacyJpaImpl
"legacy-hbm"
is an abbreviation forImplicitNamingStrategyLegacyHbmImpl
"component-path"
is an abbreviation forImplicitNamingStrategyComponentPathImpl
By default, the
ImplicitNamingStrategy
registered under the key"default"
is used. If no strategy is explicitly registered under that key,ImplicitNamingStrategyJpaCompliantImpl
is used.
-
PHYSICAL_NAMING_STRATEGY
static final String PHYSICAL_NAMING_STRATEGY
Specifies thePhysicalNamingStrategy
to use.By default,
PhysicalNamingStrategyStandardImpl
is used, in which case physical names are taken to be identical to logical names.
-
ID_DB_STRUCTURE_NAMING_STRATEGY
@Incubating static final String ID_DB_STRUCTURE_NAMING_STRATEGY
An implicit naming strategy for database structures (tables, sequences) related to identifier generators.Resolution uses the
StrategySelector
service and accepts any of the forms discussed onStrategySelector.resolveDefaultableStrategy(Class, Object, java.util.concurrent.Callable)
.The recognized short names being:
-
COLUMN_ORDERING_STRATEGY
static final String COLUMN_ORDERING_STRATEGY
Used to specify theColumnOrderingStrategy
class to use. The following shortcut names are defined for this setting:"default"
is an abbreviations forColumnOrderingStrategyStandard
"legacy"
is an abbreviation forColumnOrderingStrategyLegacy
By default, the ColumnOrderingStrategy registered under the key
"default"
is used. If no strategy is explicitly registered under that key,ColumnOrderingStrategyStandard
is used.
-
ARTIFACT_PROCESSING_ORDER
@Deprecated(since="6", forRemoval=true) static final String ARTIFACT_PROCESSING_ORDER
Deprecated, for removal: This API element is subject to removal in a future version.hbm.xml
mappings are no longer supported, making this attribute irrelevantSpecifies the order in which metadata sources should be processed, is a delimited list of values defined byMetadataSourceType
.The default is
"hbm,class"
which thathbm.xml
files should be processed first, followed by annotations (combined withorm.xml
mappings).
-
KEYWORD_AUTO_QUOTING_ENABLED
static final String KEYWORD_AUTO_QUOTING_ENABLED
Specifies whether to automatically quote any names that are deemed SQL keywords.Auto-quoting of SQL keywords is disabled by default.
- Since:
- 5.0
- See Also:
- Constant Field Values
-
XML_MAPPING_ENABLED
static final String XML_MAPPING_ENABLED
When disabled, specifies that processing of XML-based mappings should be skipped.This is a performance optimization appropriate when all O/R mappings are defined exclusively using annotations.
By default, the XML-based mappings are taken into account.
- Since:
- 5.4.1
- See Also:
- Constant Field Values
-
DEFAULT_LIST_SEMANTICS
static final String DEFAULT_LIST_SEMANTICS
Specifies theCollectionClassification
to use when Hibernate detects a plural attribute typed asList
with no explicit list index configuration.Accepts any of:
- an instance of
CollectionClassification
- the (case insensitive) name of a
CollectionClassification
(list e.g.) - a
Class
representing eitherList
orCollection
By default, when this property is not set, an attribute of type
List
is taken to have the semantics of a bag unless it is annotatedOrderColumn
orListIndexBase
.- Since:
- 6.0
- See Also:
Bag
, Constant Field Values
- an instance of
-
SESSION_FACTORY_NAME
static final String SESSION_FACTORY_NAME
Setting used to name the HibernateSessionFactory
.Naming the SessionFactory allows for it to be properly serialized across JVMs as long as the same name is used on each JVM.
If
SESSION_FACTORY_NAME_IS_JNDI
is set totrue
, this is also the name under which the SessionFactory is bound into JNDI on startup and from which it can be obtained from JNDI.
-
SESSION_FACTORY_NAME_IS_JNDI
static final String SESSION_FACTORY_NAME_IS_JNDI
Does the value defined bySESSION_FACTORY_NAME
represent a JNDI namespace into which theSessionFactory
should be bound and made accessible?Defaults to
true
for backwards compatibility.Set this to
false
if naming a SessionFactory is needed for serialization purposes, but no writable JNDI context exists in the runtime environment or if the user simply does not want JNDI to be used.
-
SHOW_SQL
static final String SHOW_SQL
Enables logging of generated SQL to the console.- See Also:
- Constant Field Values
-
FORMAT_SQL
static final String FORMAT_SQL
Enables formatting of SQL logged to the console.- See Also:
- Constant Field Values
-
HIGHLIGHT_SQL
static final String HIGHLIGHT_SQL
Enables highlighting of SQL logged to the console using ANSI escape codes.- See Also:
- Constant Field Values
-
USE_SQL_COMMENTS
static final String USE_SQL_COMMENTS
Specifies that comments should be added to the generated SQL.
-
MAX_FETCH_DEPTH
static final String MAX_FETCH_DEPTH
Specifies the maximum depth of nested outer join fetching.
-
DEFAULT_BATCH_FETCH_SIZE
static final String DEFAULT_BATCH_FETCH_SIZE
Specifies the default batch size for batch fetching.
-
USE_SCROLLABLE_RESULTSET
static final String USE_SCROLLABLE_RESULTSET
When enabled, specifies that JDBC scrollableResultSet
s may be used. This property is only necessary when there is noConnectionProvider
, that is, when the client is supplying JDBC connections.
-
USE_GET_GENERATED_KEYS
static final String USE_GET_GENERATED_KEYS
Specifies that generated primary keys may be retrieved using the JDBC 3Statement.getGeneratedKeys()
operation.Usually, performance will be improved if this behavior is enabled, assuming the JDBC driver supports
getGeneratedKeys()
.
-
STATEMENT_FETCH_SIZE
static final String STATEMENT_FETCH_SIZE
Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed. If0
, the JDBC driver's default settings will be used.
-
STATEMENT_BATCH_SIZE
static final String STATEMENT_BATCH_SIZE
Specifies the maximum JDBC batch size. A nonzero value enables batch updates.
-
BATCH_STRATEGY
static final String BATCH_STRATEGY
Specifies a customBatchBuilder
.- See Also:
- Constant Field Values
-
BATCH_VERSIONED_DATA
static final String BATCH_VERSIONED_DATA
When enabled, specifies that versioned data should be included in batching.
-
JDBC_TIME_ZONE
static final String JDBC_TIME_ZONE
Specifies the time zone to use in the JDBC driver, which is supposed to match the database timezone.This is the timezone what will be passed to
PreparedStatement.setTimestamp(int, java.sql.Timestamp, java.util.Calendar)
PreparedStatement.setTime(int, java.sql.Time, java.util.Calendar)
,ResultSet.getTimestamp(int, Calendar)
, andResultSet.getTime(int, Calendar)
when binding parameters.The time zone may be given as:
- an instance of
TimeZone
, - an instance of
ZoneId
, or - a time zone ID string to be passed to
ZoneId.of(String)
.
By default, the JVM default time zone is assumed by the JDBC driver.
- Since:
- 5.2.3
- See Also:
- Constant Field Values
- an instance of
-
AUTO_CLOSE_SESSION
static final String AUTO_CLOSE_SESSION
When enabled, specifies that theSession
should be closed automatically at the end of each transaction.
-
FLUSH_BEFORE_COMPLETION
static final String FLUSH_BEFORE_COMPLETION
When enabled, specifies that automatic flushing should occur during the JTASynchronization.beforeCompletion()
callback.
-
CONNECTION_HANDLING
static final String CONNECTION_HANDLING
Specifies how Hibernate should manage JDBC connections in terms of acquisition and release, either:- an instance of the enumeration
PhysicalConnectionHandlingMode
, or - the name of one of its instances.
The default is
DELAYED_ACQUISITION_AND_RELEASE_AFTER_TRANSACTION
. - an instance of the enumeration
-
CURRENT_SESSION_CONTEXT_CLASS
static final String CURRENT_SESSION_CONTEXT_CLASS
Specifies aCurrentSessionContext
for scoping the current session, either:jta
,thread
, ormanaged
, or- the name of a class implementing
org.hibernate.context.spi.CurrentSessionContext
.
JTASessionContext
is used by default.
-
USE_IDENTIFIER_ROLLBACK
static final String USE_IDENTIFIER_ROLLBACK
When enabled, specifies that the generated identifier of an entity is unset when the entity is deleted.By default, generated identifiers are never unset.
-
USE_REFLECTION_OPTIMIZER
@Deprecated(forRemoval=true) static final String USE_REFLECTION_OPTIMIZER
Deprecated, for removal: This API element is subject to removal in a future version.Will be removed without replacement. See HHH-15631When enabled, specifies that property access should be optimized via the use of generated bytecode.- See Also:
- Constant Field Values
-
CALLABLE_NAMED_PARAMS_ENABLED
static final String CALLABLE_NAMED_PARAMS_ENABLED
When enabled, specifies that Hibernate should attempt to map parameter names given in aProcedureCall
orStoredProcedureQuery
to named parameters of the JDBCCallableStatement
.- Since:
- 6.0
- See Also:
SessionFactoryOptions.isUseOfJdbcNamedParametersEnabled()
, Constant Field Values
-
SEMANTIC_QUERY_PRODUCER
static final String SEMANTIC_QUERY_PRODUCER
Specifies aHqlTranslator
to use for HQL query translation.- See Also:
- Constant Field Values
-
SEMANTIC_QUERY_TRANSLATOR
static final String SEMANTIC_QUERY_TRANSLATOR
Specifies aSqmTranslatorFactory
to use for HQL query translation.- See Also:
- Constant Field Values
-
QUERY_MULTI_TABLE_MUTATION_STRATEGY
static final String QUERY_MULTI_TABLE_MUTATION_STRATEGY
Defines the "global" strategy to use for handling HQL and Criteria mutation queries. Specifies aSqmMultiTableMutationStrategy
..- See Also:
- Constant Field Values
-
QUERY_MULTI_TABLE_INSERT_STRATEGY
static final String QUERY_MULTI_TABLE_INSERT_STRATEGY
Defines the "global" strategy to use for handling HQL and Criteria insert queries. Specifies aSqmMultiTableInsertStrategy
.- See Also:
- Constant Field Values
-
QUERY_STARTUP_CHECKING
static final String QUERY_STARTUP_CHECKING
When enabled, specifies that named queries be checked during startup.By default, named queries are checked at startup.
Mainly intended for use in test environments.
-
ORDER_UPDATES
static final String ORDER_UPDATES
Enable ordering of update statements by primary key value, for the purpose of more efficient JDBC batching
-
ORDER_INSERTS
static final String ORDER_INSERTS
Enable ordering of insert statements by primary key value, for the purpose of more efficient JDBC batching.
-
JPA_CALLBACKS_ENABLED
@Incubating static final String JPA_CALLBACKS_ENABLED
Allows JPA callbacks (viaPreUpdate
and friends) to be completely disabled. Mostly useful to save some memory when they are not used.JPA callbacks are enabled by default. Set this property to
false
to disable them.Experimental and will likely be removed as soon as the memory overhead is resolved.
- Since:
- 5.4
- See Also:
CallbackType
, Constant Field Values
-
DEFAULT_NULL_ORDERING
static final String DEFAULT_NULL_ORDERING
Specifies the default precedence of null values in the HQLORDER BY
clause, eithernone
,first
, orlast
.The default is
none
.
-
LOG_JDBC_WARNINGS
static final String LOG_JDBC_WARNINGS
When enabled, specifies that JDBC statement warnings should be logged.The default is determined by
Dialect.isJdbcLogWarningsEnabledByDefault()
.- Since:
- 5.1
- See Also:
Statement.getWarnings()
, Constant Field Values
-
BEAN_CONTAINER
static final String BEAN_CONTAINER
Identifies aBeanContainer
to be used.Note that for CDI-based containers setting this is not necessary - simply pass the
BeanManager
to use viaCDI_BEAN_MANAGER
and optionally specifyDELAY_CDI_ACCESS
. This setting useful to integrate non-CDI bean containers such as Spring.- Since:
- 5.3
- See Also:
- Constant Field Values
-
DELAY_CDI_ACCESS
static final String DELAY_CDI_ACCESS
Used in conjunction with "hibernate.resource.beans.container" when CDI is used.By default, to be JPA spec compliant, Hibernate should access the CDI
BeanManager
while bootstrapping theSessionFactory
. In some cases however this can lead to a chicken/egg situation where the JPA provider immediately accesses theBeanManager
when managed beans are awaiting JPA PU injection.This setting tells Hibernate to delay accessing until first use.
This setting has the decided downside that bean config problems will not be done at deployment time, but will instead manifest at runtime. For this reason, the preferred means for supplying a CDI BeanManager is to provide an implementation of
ExtendedBeanManager
which gives Hibernate a callback when theBeanManager
is ready for use.- Since:
- 5.0.8
- See Also:
- Constant Field Values
-
ALLOW_EXTENSIONS_IN_CDI
static final String ALLOW_EXTENSIONS_IN_CDI
Controls whether Hibernate can try to create beans other than converters and listeners using CDI. Only meaningful when a CDIcontainer
is used. By default, Hibernate will only attempt to create converter and listener beans using CDI.- Since:
- 6.2
- See Also:
- Constant Field Values
-
C3P0_CONFIG_PREFIX
static final String C3P0_CONFIG_PREFIX
A setting prefix used to indicate settings that target the hibernate-c3p0 integration- See Also:
- Constant Field Values
-
C3P0_MAX_SIZE
static final String C3P0_MAX_SIZE
Maximum size of C3P0 connection pool- See Also:
- Constant Field Values
-
C3P0_MIN_SIZE
static final String C3P0_MIN_SIZE
Minimum size of C3P0 connection pool- See Also:
- Constant Field Values
-
C3P0_TIMEOUT
static final String C3P0_TIMEOUT
Maximum idle time for C3P0 connection pool- See Also:
- Constant Field Values
-
C3P0_MAX_STATEMENTS
static final String C3P0_MAX_STATEMENTS
Maximum size of C3P0 statement cache- See Also:
- Constant Field Values
-
C3P0_ACQUIRE_INCREMENT
static final String C3P0_ACQUIRE_INCREMENT
Number of connections acquired when pool is exhausted- See Also:
- Constant Field Values
-
C3P0_IDLE_TEST_PERIOD
static final String C3P0_IDLE_TEST_PERIOD
Idle time before a C3P0 pooled connection is validated- See Also:
- Constant Field Values
-
PROXOOL_CONFIG_PREFIX
static final String PROXOOL_CONFIG_PREFIX
A setting prefix used to indicate settings that target the hibernate-proxool integration- See Also:
- Constant Field Values
-
PROXOOL_XML
static final String PROXOOL_XML
Proxool property to configure the Proxool provider using an XML (/path/to/file.xml
)- See Also:
- Constant Field Values
-
PROXOOL_PROPERTIES
static final String PROXOOL_PROPERTIES
Proxool property to configure the Proxool provider using a properties file (/path/to/proxool.properties
)- See Also:
- Constant Field Values
-
PROXOOL_EXISTING_POOL
static final String PROXOOL_EXISTING_POOL
Proxool property to configure the Proxool Provider from an already existing pool (true
/false
)- See Also:
- Constant Field Values
-
PROXOOL_POOL_ALIAS
static final String PROXOOL_POOL_ALIAS
Proxool property with the Proxool pool alias to use (Required forPROXOOL_EXISTING_POOL
,PROXOOL_PROPERTIES
, orPROXOOL_XML
)- See Also:
- Constant Field Values
-
CACHE_REGION_FACTORY
static final String CACHE_REGION_FACTORY
TheRegionFactory
implementation, either:- an instance of
RegionFactory
, - a
Class
implementingRegionFactory
, or - he name of a class implementing
RegionFactory
.
Defaults to
NoCachingRegionFactory
, so that caching is disabled.- See Also:
USE_SECOND_LEVEL_CACHE
, Constant Field Values
- an instance of
-
CACHE_KEYS_FACTORY
@Deprecated static final String CACHE_KEYS_FACTORY
Deprecated.this is only honored forhibernate-infinispan
Specifies theCacheKeysFactory
to use, either:- an instance of
CacheKeysFactory
, - a
Class
implementingCacheKeysFactory
, - the name of a class implementing
CacheKeysFactory
, "default"
as a short name forDefaultCacheKeysFactory
, or"simple"
as a short name forSimpleCacheKeysFactory
.
- Since:
- 5.2
- See Also:
- Constant Field Values
- an instance of
-
USE_SECOND_LEVEL_CACHE
static final String USE_SECOND_LEVEL_CACHE
When enabled, specifies that the second-level cache may be used.By default, if the configured
RegionFactory
is not theNoCachingRegionFactory
, then the second-level cache is enabled. Otherwise, the second-level cache is disabled.
-
USE_QUERY_CACHE
static final String USE_QUERY_CACHE
Enable the query cache (disabled by default).
-
QUERY_CACHE_FACTORY
static final String QUERY_CACHE_FACTORY
Specifies theTimestampsCacheFactory
to use.
-
CACHE_REGION_PREFIX
static final String CACHE_REGION_PREFIX
TheCacheProvider
region name prefix
-
USE_MINIMAL_PUTS
static final String USE_MINIMAL_PUTS
Optimize interaction with the second-level cache to minimize writes, at the cost of an additional read before each write. This setting is useful if writes to the cache are much more expensive than reads from the cache, for example, if the cache is a distributed cache.It's not usually necessary to set this explicitly because, by default, it's set to a sensible value by the second-level cache implementation.
-
USE_STRUCTURED_CACHE
static final String USE_STRUCTURED_CACHE
Enables the use of structured second-level cache entries. This makes the cache entries human-readable, but carries a performance cost.
-
AUTO_EVICT_COLLECTION_CACHE
static final String AUTO_EVICT_COLLECTION_CACHE
-
USE_DIRECT_REFERENCE_CACHE_ENTRIES
static final String USE_DIRECT_REFERENCE_CACHE_ENTRIES
Enable direct storage of entity references into the second level cache when applicable. This is appropriate only for immutable entities.By default, entities are always stored in a "disassembled" form, that is, as a tuple of attribute values.
-
GLOBALLY_QUOTED_IDENTIFIERS
static final String GLOBALLY_QUOTED_IDENTIFIERS
When enabled, all database identifiers are quoted.- See Also:
- Constant Field Values
-
GLOBALLY_QUOTED_IDENTIFIERS_SKIP_COLUMN_DEFINITIONS
static final String GLOBALLY_QUOTED_IDENTIFIERS_SKIP_COLUMN_DEFINITIONS
AssumingGLOBALLY_QUOTED_IDENTIFIERS
, this allows global quoting to skip column definitions defined byColumn
,JoinColumn
, etc.JPA states that column definitions are subject to global quoting, so by default this setting is
false
for JPA compliance. Set totrue
to avoid explicit column names being quoted due to global quoting (they will still be quoted if explicitly quoted in the annotation or XML).- See Also:
- Constant Field Values
-
CHECK_NULLABILITY
static final String CHECK_NULLABILITY
Enable nullability checking, raises an exception if an attribute marked as not null is null at runtime.Defaults to disabled if Bean Validation is present in the classpath and annotations are used, or enabled otherwise.
-
BYTECODE_PROVIDER
static final String BYTECODE_PROVIDER
Selects a bytecode enhancement library.At present only bytebuddy is supported, bytebuddy being the default since version 5.3.
- See Also:
- Constant Field Values
-
JPAQL_STRICT_COMPLIANCE
static final String JPAQL_STRICT_COMPLIANCE
- See Also:
- Constant Field Values
-
PREFERRED_POOLED_OPTIMIZER
static final String PREFERRED_POOLED_OPTIMIZER
When a generator specifies an increment-size and an optimizer was not explicitly specified, which of the "pooled" optimizers should be preferred? Can specify an optimizer short name or the name of a class which implementsOptimizer
.- See Also:
- Constant Field Values
-
QUERY_PLAN_CACHE_ENABLED
static final String QUERY_PLAN_CACHE_ENABLED
When enabled, specifies that query plans should be cached.By default, the query plan cache is disabled, unless one of the configuration properties "hibernate.query.plan_cache_max_size" or "hibernate.query.plan_parameter_metadata_max_size" is set.
- See Also:
- Constant Field Values
-
QUERY_PLAN_CACHE_MAX_SIZE
static final String QUERY_PLAN_CACHE_MAX_SIZE
The maximum number of entries in the query plan cache or query interpretation cache.The default maximum is 2048.
- See Also:
QueryPlanCache
, Constant Field Values
-
QUERY_PLAN_CACHE_PARAMETER_METADATA_MAX_SIZE
@Deprecated(since="6.0") static final String QUERY_PLAN_CACHE_PARAMETER_METADATA_MAX_SIZE
Deprecated.this setting is not currently usedThe maximum number ofParameterMetadata
instances maintained by theQueryInterpretationCache
.- See Also:
- Constant Field Values
-
NON_CONTEXTUAL_LOB_CREATION
static final String NON_CONTEXTUAL_LOB_CREATION
When enabled, specifies that Hibernate should not use contextual LOB creation.- See Also:
LobCreator
,LobCreationContext
, Constant Field Values
-
HBM2DDL_AUTO
static final String HBM2DDL_AUTO
Setting to performSchemaManagementTool
actions automatically as part of theSessionFactory
lifecycle. Valid options are enumerated byAction
.Interpreted in combination with
JAKARTA_HBM2DDL_DATABASE_ACTION
andJAKARTA_HBM2DDL_SCRIPTS_ACTION
. If no value is specified, the default is"none"
.- See Also:
Action
, Constant Field Values
-
HBM2DDL_DATABASE_ACTION
@Deprecated static final String HBM2DDL_DATABASE_ACTION
Deprecated.UseJAKARTA_HBM2DDL_DATABASE_ACTION
instead- See Also:
- Constant Field Values
-
HBM2DDL_SCRIPTS_ACTION
@Deprecated static final String HBM2DDL_SCRIPTS_ACTION
Deprecated.UseJAKARTA_HBM2DDL_SCRIPTS_ACTION
instead- See Also:
- Constant Field Values
-
HBM2DDL_CONNECTION
@Deprecated static final String HBM2DDL_CONNECTION
Deprecated.UseJAKARTA_HBM2DDL_CONNECTION
instead- See Also:
- Constant Field Values
-
HBM2DDL_CREATE_SOURCE
@Deprecated static final String HBM2DDL_CREATE_SOURCE
Deprecated.Migrate toJAKARTA_HBM2DDL_CREATE_SOURCE
instead- See Also:
SourceType
, Constant Field Values
-
HBM2DDL_DROP_SOURCE
@Deprecated static final String HBM2DDL_DROP_SOURCE
Deprecated.Migrate toJAKARTA_HBM2DDL_DROP_SOURCE
.- See Also:
SourceType
, Constant Field Values
-
HBM2DDL_CREATE_SCRIPT_SOURCE
@Deprecated static final String HBM2DDL_CREATE_SCRIPT_SOURCE
Deprecated.Migrate toJAKARTA_HBM2DDL_CREATE_SCRIPT_SOURCE
- See Also:
- Constant Field Values
-
HBM2DDL_DROP_SCRIPT_SOURCE
@Deprecated static final String HBM2DDL_DROP_SCRIPT_SOURCE
Deprecated.Migrate toJAKARTA_HBM2DDL_DROP_SCRIPT_SOURCE
- See Also:
- Constant Field Values
-
HBM2DDL_SCRIPTS_CREATE_TARGET
@Deprecated static final String HBM2DDL_SCRIPTS_CREATE_TARGET
Deprecated.Migrate toJAKARTA_HBM2DDL_SCRIPTS_CREATE_TARGET
- See Also:
- Constant Field Values
-
HBM2DDL_SCRIPTS_CREATE_APPEND
static final String HBM2DDL_SCRIPTS_CREATE_APPEND
For cases where the "javax.persistence.schema-generation.scripts.action" value indicates that schema commands should be written to DDL script file, specifies if schema commands should be appended to the end of the file rather than written at the beginning of the file.Values are:
true
for appending schema commands to the end of the file,false
for writing schema commands at the beginning.The default value is
true
- See Also:
- Constant Field Values
-
HBM2DDL_SCRIPTS_DROP_TARGET
@Deprecated static final String HBM2DDL_SCRIPTS_DROP_TARGET
Deprecated.Migrate toJAKARTA_HBM2DDL_SCRIPTS_DROP_TARGET
- See Also:
- Constant Field Values
-
HBM2DDL_IMPORT_FILES
static final String HBM2DDL_IMPORT_FILES
Specifies a comma-separated list of file names of scripts containing SQL DML statements that should be executed after schema export completes. The order of the scripts is significant, with the first script in the list being executed first.The scripts are only executed if the schema is created by Hibernate, that is, if "hibernate.hbm2ddl.auto" is set to
create
orcreate-drop
.The default value is
/import.sql
.The JPA-standard setting
JAKARTA_HBM2DDL_CREATE_SCRIPT_SOURCE
is now preferred.- See Also:
- Constant Field Values
-
HBM2DDL_LOAD_SCRIPT_SOURCE
@Deprecated static final String HBM2DDL_LOAD_SCRIPT_SOURCE
Deprecated.UseJAKARTA_HBM2DDL_LOAD_SCRIPT_SOURCE
instead- See Also:
- Constant Field Values
-
HBM2DDL_IMPORT_FILES_SQL_EXTRACTOR
static final String HBM2DDL_IMPORT_FILES_SQL_EXTRACTOR
TheSqlScriptCommandExtractor
implementation to use for parsing source/import files specified byJAKARTA_HBM2DDL_CREATE_SCRIPT_SOURCE
,JAKARTA_HBM2DDL_DROP_SCRIPT_SOURCE
orHBM2DDL_IMPORT_FILES
. Either:- an instance of
SqlScriptCommandExtractor
, - a
Class
object representing a class that implementsSqlScriptCommandExtractor
, or - the name of a class that implements
SqlScriptCommandExtractor
.
The correct extractor to use depends on the format of the SQL script:
- if the script has one complete SQL statement per line, use
SingleLineSqlScriptExtractor
, or - if a script contains statements spread over multiple lines, use
MultiLineSqlScriptExtractor
.
The default value is
org.hibernate.tool.schema.internal.script.SingleLineSqlScriptExtractor
. - an instance of
-
HBM2DDL_CREATE_NAMESPACES
static final String HBM2DDL_CREATE_NAMESPACES
Specifies whether to automatically create also the database schema/catalog. The default is false.- Since:
- 5.0
- See Also:
- Constant Field Values
-
HBM2DDL_CREATE_SCHEMAS
@Deprecated static final String HBM2DDL_CREATE_SCHEMAS
Deprecated.UseJAKARTA_HBM2DDL_CREATE_SCHEMAS
instead- See Also:
- Constant Field Values
-
JAKARTA_HBM2DDL_DATABASE_ACTION
static final String JAKARTA_HBM2DDL_DATABASE_ACTION
Specifies what type of schema tooling action should be performed against the database specified using either "jakarta.persistence.schema-generation-connection" or the configuredConnectionProvider
for theSessionFactory
.Valid options are enumerated by
Action
.This setting takes precedence over "hibernate.hbm2ddl.auto".
If no value is specified, the default is
"none"
.
-
JAKARTA_HBM2DDL_SCRIPTS_ACTION
static final String JAKARTA_HBM2DDL_SCRIPTS_ACTION
Specifies what type of schema tooling action should be written to script files.Valid options are enumerated by
Action
.The script file is identified using "jakarta.persistence.schema-generation.scripts.create-target".
If no value is specified, the default is
"none"
.
-
JAKARTA_HBM2DDL_CONNECTION
static final String JAKARTA_HBM2DDL_CONNECTION
Allows passing a specificConnection
instance to be used bySchemaManagementTool
for the purpose of determining theDialect
, and for performingdatabase actions
if requested.For
Dialect
resolution, "jakarta.persistence.database-product-name" and, optionally, "jakarta.persistence.database-product-version", "jakarta.persistence.database-major-version", and "jakarta.persistence.database-minor-version" can be used instead
-
JAKARTA_HBM2DDL_DB_NAME
static final String JAKARTA_HBM2DDL_DB_NAME
Specifies the name of the database vendor (as would be reported byDatabaseMetaData.getDatabaseProductName()
) for the purpose of determining theDialect
to use.For cases when the name of the database vendor is not enough alone, a combination of "jakarta.persistence.database-product-version", "jakarta.persistence.database-major-version" "jakarta.persistence.database-minor-version" can be used instead
- See Also:
JAKARTA_HBM2DDL_DB_VERSION
,JAKARTA_HBM2DDL_DB_MAJOR_VERSION
,JAKARTA_HBM2DDL_DB_MINOR_VERSION
, Constant Field Values- Implementation Specification:
database actions
are not available when supplying just the name and versions
-
JAKARTA_HBM2DDL_DB_VERSION
static final String JAKARTA_HBM2DDL_DB_VERSION
Used in conjunction with "jakarta.persistence.database-product-name" for the purpose of determining theDialect
to use when the name does not provide enough detail.The value is expected to match what would be returned from
DatabaseMetaData.getDatabaseProductVersion()
) for the underlying database.- See Also:
JAKARTA_HBM2DDL_DB_NAME
, Constant Field Values
-
JAKARTA_HBM2DDL_DB_MAJOR_VERSION
static final String JAKARTA_HBM2DDL_DB_MAJOR_VERSION
Used in conjunction with "jakarta.persistence.database-product-name" for the purpose of determining theDialect
to use when the name does not provide enough detail.The value is expected to match what would be returned from
DatabaseMetaData.getDatabaseMajorVersion()
) for the underlying database.- See Also:
JAKARTA_HBM2DDL_DB_NAME
, Constant Field Values
-
JAKARTA_HBM2DDL_DB_MINOR_VERSION
static final String JAKARTA_HBM2DDL_DB_MINOR_VERSION
Used in conjunction with "jakarta.persistence.database-product-name" for the purpose of determining theDialect
to use when the name does not provide enough detail.The value is expected to match what would be returned from
DatabaseMetaData.getDatabaseMinorVersion()
) for the underlying database.- See Also:
JAKARTA_HBM2DDL_DB_NAME
, Constant Field Values
-
JAKARTA_HBM2DDL_CREATE_SOURCE
static final String JAKARTA_HBM2DDL_CREATE_SOURCE
Specifies whether schema generation commands for schema creation are to be determined based on object/relational mapping metadata, DDL scripts, or a combination of the two. SeeSourceType
for the list of legal values.If no value is specified, a default is inferred as follows:
- if source scripts are specified via "jakarta.persistence.schema-generation.create-source",
then
"script"
is assumed, or - otherwise,
"metadata"
is assumed.
- See Also:
SourceType
, Constant Field Values
- if source scripts are specified via "jakarta.persistence.schema-generation.create-source",
then
-
JAKARTA_HBM2DDL_DROP_SOURCE
static final String JAKARTA_HBM2DDL_DROP_SOURCE
Specifies whether schema generation commands for schema dropping are to be determined based on object/relational mapping metadata, DDL scripts, or a combination of the two. SeeSourceType
for the list of legal values.If no value is specified, a default is inferred as follows:
- if source scripts are specified via "jakarta.persistence.schema-generation.drop-script-source", then "script" is assumed, or
- otherwise, "metadata" is assumed.
- See Also:
SourceType
, Constant Field Values
-
JAKARTA_HBM2DDL_CREATE_SCRIPT_SOURCE
static final String JAKARTA_HBM2DDL_CREATE_SCRIPT_SOURCE
Specifies the CREATE script file as either aReader
configured for reading the DDL script file or a string designating a fileURL
for the DDL script.Hibernate historically also accepted
HBM2DDL_IMPORT_FILES
for a similar purpose. This setting is now preferred.
-
JAKARTA_HBM2DDL_DROP_SCRIPT_SOURCE
static final String JAKARTA_HBM2DDL_DROP_SCRIPT_SOURCE
Specifies the DROP script file as either aReader
configured for reading the DDL script file or a string designating a fileURL
for the DDL script.- See Also:
JAKARTA_HBM2DDL_DROP_SOURCE
, Constant Field Values
-
JAKARTA_HBM2DDL_SCRIPTS_CREATE_TARGET
static final String JAKARTA_HBM2DDL_SCRIPTS_CREATE_TARGET
For cases where "jakarta.persistence.schema-generation.scripts.action" indicates that schema creation commands should be written to a script file, this setting specifies either aWriter
configured for output of the DDL script or a string specifying the file URL for the DDL script.
-
JAKARTA_HBM2DDL_SCRIPTS_DROP_TARGET
static final String JAKARTA_HBM2DDL_SCRIPTS_DROP_TARGET
For cases where "jakarta.persistence.schema-generation.scripts.action" indicates that schema drop commands should be written to a script file, this setting specifies either aWriter
configured for output of the DDL script or a string specifying the file URL for the DDL script.
-
JAKARTA_HBM2DDL_LOAD_SCRIPT_SOURCE
static final String JAKARTA_HBM2DDL_LOAD_SCRIPT_SOURCE
JPA-standard variant ofHBM2DDL_IMPORT_FILES
for specifying a database initialization script to be run as part of schema-exportSpecifies a
Reader
configured for reading of the SQL load script or a string designating theURL
for the SQL load script.- See Also:
- Constant Field Values
-
JAKARTA_HBM2DDL_CREATE_SCHEMAS
static final String JAKARTA_HBM2DDL_CREATE_SCHEMAS
The JPA variant ofHBM2DDL_CREATE_NAMESPACES
used to specify whether database schemas used in the mapping model should be created on export in addition to creating the tables, sequences, etc.The default is
false
, meaning to not create schemas- See Also:
- Constant Field Values
-
HBM2DDL_FILTER_PROVIDER
static final String HBM2DDL_FILTER_PROVIDER
Used to specify theSchemaFilterProvider
to be used by create, drop, migrate and validate operations on the database schema. ASchemaFilterProvider
provides filters that can be used to limit the scope of these operations to specific namespaces, tables and sequences. All objects are included by default.- Since:
- 5.1
- See Also:
- Constant Field Values
-
HBM2DDL_JDBC_METADATA_EXTRACTOR_STRATEGY
static final String HBM2DDL_JDBC_METADATA_EXTRACTOR_STRATEGY
Setting to choose the strategy used to access the JDBC Metadata.Valid options are defined by
JdbcMetadaAccessStrategy
.JdbcMetadaAccessStrategy.GROUPED
is the default.- See Also:
JdbcMetadaAccessStrategy
, Constant Field Values
-
HBM2DDL_DELIMITER
static final String HBM2DDL_DELIMITER
Identifies the delimiter to use to separate schema management statements in script outputs.The default value is
;
.- See Also:
- Constant Field Values
-
HBM2DDL_CHARSET_NAME
static final String HBM2DDL_CHARSET_NAME
The name of the charset used by the schema generation resource.By default, the JVM default charset is used.
- Since:
- 5.2.3
- See Also:
- Constant Field Values
-
HBM2DDL_HALT_ON_ERROR
static final String HBM2DDL_HALT_ON_ERROR
When enabled, specifies that the schema migration tool should halt on any error, terminating the bootstrap process.- Since:
- 5.2.4
- See Also:
- Constant Field Values
-
HBM2DDL_DEFAULT_CONSTRAINT_MODE
static final String HBM2DDL_DEFAULT_CONSTRAINT_MODE
Used with theConstraintMode.PROVIDER_DEFAULT
strategy for foreign key mapping.Valid values are
ConstraintMode.CONSTRAINT
andConstraintMode.NO_CONSTRAINT
.The default value is
ConstraintMode.CONSTRAINT
.- Since:
- 5.4
- See Also:
- Constant Field Values
-
CUSTOM_ENTITY_DIRTINESS_STRATEGY
static final String CUSTOM_ENTITY_DIRTINESS_STRATEGY
Setting to identify aCustomEntityDirtinessStrategy
to use. May specify either a class name or an instance.
-
USE_ENTITY_WHERE_CLAUSE_FOR_COLLECTIONS
@Remove @Deprecated(forRemoval=true, since="6.2") static final @Remove String USE_ENTITY_WHERE_CLAUSE_FOR_COLLECTIONS
Deprecated, for removal: This API element is subject to removal in a future version.Originally added as a backwards compatibility flagTheWhere
annotation specifies a restriction on the table rows which are visible as entity class instances or collection elements. This setting controls whether the restriction applied to an entity should be applied to association fetches (one-to-one, many-to-one, one-to-many and many-to-many) targeting the entity.- See Also:
- Constant Field Values
- API Note:
- The setting is very misnamed - it applies across all entity associations, not just collections.
- Implementation Specification:
- Enabled (
true
) by default, meaning the restriction is applied. When this setting is disabled (false
), the restriction is not applied.
-
MULTI_TENANT_CONNECTION_PROVIDER
static final String MULTI_TENANT_CONNECTION_PROVIDER
Specifies aMultiTenantConnectionProvider
to use. SinceMultiTenantConnectionProvider
is also a service, it may be configured directly via theStandardServiceRegistryBuilder
.- Since:
- 4.1
- See Also:
- Constant Field Values
-
MULTI_TENANT_IDENTIFIER_RESOLVER
static final String MULTI_TENANT_IDENTIFIER_RESOLVER
Specifies aCurrentTenantIdentifierResolver
to use, either:- an instance of
CurrentTenantIdentifierResolver
, - a
Class
representing an class that implementsCurrentTenantIdentifierResolver
, or - the name of a class that implements
CurrentTenantIdentifierResolver
.
- an instance of
-
INTERCEPTOR
static final String INTERCEPTOR
Specifies anInterceptor
implementation associated with theSessionFactory
and propagated to eachSession
created from theSessionFactory
. Either:- an instance of
Interceptor
, - a
Class
representing a class that implementsInterceptor
, or - the name of a class that implements
Interceptor
.
This setting identifies an
Interceptor
which is effectively a singleton across all the sessions opened from theSessionFactory
to which it is applied; the same instance will be passed to eachSession
. If there should be a separate instance ofInterceptor
for eachSession
, useSESSION_SCOPED_INTERCEPTOR
instead.- Since:
- 5.0
- See Also:
SessionFactoryBuilder.applyInterceptor(Interceptor)
, Constant Field Values
- an instance of
-
SESSION_SCOPED_INTERCEPTOR
static final String SESSION_SCOPED_INTERCEPTOR
Specifies anInterceptor
implementation associated with theSessionFactory
and propagated to eachSession
created from theSessionFactory
. Either:- a
Class
representing a class that implementsInterceptor
, - the name of a class that implements
Interceptor
, or - an instance of
Supplier
used to obtain the interceptor.
Note that this setting cannot specify an
Interceptor
instance.This setting identifies an
Interceptor
implementation that is to be applied to everySession
opened from theSessionFactory
, but unlikeINTERCEPTOR
, a separate instance created for eachSession
. - a
-
STATEMENT_INSPECTOR
static final String STATEMENT_INSPECTOR
Specifies aStatementInspector
implementation associated with theSessionFactory
, either:- an instance of
StatementInspector
, - a
Class
representing an class that implementsStatementInspector
, or - the name of a class that implements
StatementInspector
.
- Since:
- 5.0
- See Also:
SessionFactoryBuilder.applyStatementInspector(StatementInspector)
, Constant Field Values
- an instance of
-
ENABLE_LAZY_LOAD_NO_TRANS
static final String ENABLE_LAZY_LOAD_NO_TRANS
Allows a detached proxy or lazy collection to be fetched even when not associated with an open persistence context, by creating a temporary persistence context when the proxy or collection is accessed. This behavior is not recommended, since it can easily break transaction isolation or lead to data aliasing. It is therefore disabled by default.
-
BATCH_FETCH_STYLE
@Deprecated(since="6.0") static final String BATCH_FETCH_STYLE
Deprecated.An appropriate batch-fetch style is selected automaticallySpecifies theBatchFetchStyle
to use, either the name of a {code BatchFetchStyle} instance, or an instance ofBatchFetchStyle
.- See Also:
- Constant Field Values
-
DELAY_ENTITY_LOADER_CREATIONS
static final String DELAY_ENTITY_LOADER_CREATIONS
Controls how entity loaders are created.When
true
, the default, the loaders are only created on first access; this ensures that all access patterns which are not useful to the application are never instantiated, possibly saving a substantial amount of memory for applications having many entities. The only exception is the loader forLockMode.NONE
, which will always be eagerly initialized; this is necessary to detect mapping errors.false
indicates that all loaders should be created up front; this will consume more memory but ensures all necessary memory is allocated right away.- Since:
- 5.3
- See Also:
SessionFactoryBuilder.applyDelayedEntityLoaderCreations(boolean)
, Constant Field Values
-
JTA_TRACK_BY_THREAD
static final String JTA_TRACK_BY_THREAD
A transaction can be rolled back by another thread ("tracking by thread") -- not the original application. Examples of this include a JTA transaction timeout handled by a background reaper thread. The ability to handle this situation requires checking the Thread ID every time Session is called. This can certainly have performance considerations.Default is
true
(enabled).
-
ENABLE_SYNONYMS
static final String ENABLE_SYNONYMS
If enabled, allows schema update and validation to support synonyms. Due to the possibility that this would return duplicate tables (especially in Oracle), this is disabled by default.- See Also:
- Constant Field Values
-
EXTRA_PHYSICAL_TABLE_TYPES
static final String EXTRA_PHYSICAL_TABLE_TYPES
Specifies a comma-separated list of extra table types, in addition to the default types"TABLE"
and"VIEW"
, to recognize as physical tables when performing schema update, creation and validation.- Since:
- 5.0
- See Also:
- Constant Field Values
-
UNIQUE_CONSTRAINT_SCHEMA_UPDATE_STRATEGY
static final String UNIQUE_CONSTRAINT_SCHEMA_UPDATE_STRATEGY
Unique columns and unique keys both use unique constraints in most dialects. The schema exporter must create these constraints, but database support for finding existing constraints is extremely inconsistent. Worse, unique constraints without explicit names are assigned names with randomly generated characters.Therefore, select from these strategies:
DROP_RECREATE_QUIETLY
: Attempt to drop, then (re-)create each unique constraint, ignoring any exceptions thrown. This is the default.RECREATE_QUIETLY
: attempt to (re-)create unique constraints, ignoring exceptions thrown if the constraint already existed.SKIP
: do not attempt to create unique constraints on a schema update.
- See Also:
- Constant Field Values
-
GENERATE_STATISTICS
static final String GENERATE_STATISTICS
When enabled, specifies that statistics should be collected.
-
LOG_SESSION_METRICS
static final String LOG_SESSION_METRICS
Controls whether session metrics should be logged for any session in which statistics are being collected.By default, logging of session metrics is disabled unless
GENERATE_STATISTICS
is enabled.- See Also:
- Constant Field Values
-
LOG_SLOW_QUERY
static final String LOG_SLOW_QUERY
Specifies a duration in milliseconds defining the minimum query execution time that characterizes a "slow" query. Any SQL query which takes longer than this amount of time to execute will be logged.A value of
0
, the default, disables logging of "slow" queries.- See Also:
- Constant Field Values
-
AUTO_SESSION_EVENTS_LISTENER
static final String AUTO_SESSION_EVENTS_LISTENER
Defines a defaultSessionEventListener
to be applied to newly-openedSession
s.- See Also:
- Constant Field Values
-
CREATE_EMPTY_COMPOSITES_ENABLED
@Incubating @Deprecated(since="6") static final String CREATE_EMPTY_COMPOSITES_ENABLED
Deprecated.It makes no sense at all to enable this at the global level for a persistence unit. If anything, it could be a setting specific to a given embeddable class. But, four years after the introduction of this feature, it's still marked experimental and has multiple known unresolved bugs. It's therefore time for those who advocated for this feature to accept defeat.Enable instantiation of composite/embedded objects when all attribute values arenull
. The default (and historical) behavior is that anull
reference will be used to represent the composite value when all of its attributes arenull
.- Since:
- 5.1
- See Also:
- Constant Field Values
- API Note:
- This is an experimental feature that has known issues. It should not be used in production until it is stabilized. See Hibernate JIRA issue HHH-11936 for details.
-
ALLOW_JTA_TRANSACTION_ACCESS
static final String ALLOW_JTA_TRANSACTION_ACCESS
When enabled, allows access to theTransaction
even when using a JTA for transaction management.Values are
true
, which grants access, andfalse
, which does not.The default behavior is to allow access unless Hibernate is bootstrapped via JPA.
- See Also:
- Constant Field Values
-
ALLOW_UPDATE_OUTSIDE_TRANSACTION
static final String ALLOW_UPDATE_OUTSIDE_TRANSACTION
When enabled, allows update operations outside a transaction.Since version 5.2 Hibernate conforms with the JPA specification and disallows flushing any update outside a transaction.
Values are
true
, which allows flushing outside a transaction, andfalse
, which does not.The default behavior is to disallow update operations outside a transaction.
- Since:
- 5.2
- See Also:
SessionFactoryBuilder.allowOutOfTransactionUpdateOperations(boolean)
, Constant Field Values
-
ALLOW_REFRESH_DETACHED_ENTITY
static final String ALLOW_REFRESH_DETACHED_ENTITY
When enabled, allows calls toEntityManager.refresh(Object)
andSession.refresh(Object)
on a detached entity instance.Values are
true
, which allows refreshing a detached instance andfalse
, which does not. When refreshing is disallowed, anIllegalArgumentException
is thrown.The default behavior is to allow refreshing a detached instance unless Hibernate is bootstrapped via JPA.
- Since:
- 5.2
- See Also:
- Constant Field Values
-
MERGE_ENTITY_COPY_OBSERVER
static final String MERGE_ENTITY_COPY_OBSERVER
Setting that specifies how Hibernate will respond when multiple representations of the same persistent entity ("entity copy") are detected while merging.The possible values are:
- disallow (the default): throws
IllegalStateException
if an entity copy is detected - allow: performs the merge operation on each entity copy that is detected
- log: (provided for testing only) performs the merge operation on each entity
copy that is detected and logs information about the entity copies. This
setting requires DEBUG logging be enabled for
EntityCopyAllowedLoggedObserver
.
Alternatively, the application may customize the behavior by providing an implementation of
EntityCopyObserver
and setting the property "hibernate.event.merge.entity_copy_observer" to the class name.When this property is set to
allow
orlog
, Hibernate will merge each entity copy detected while cascading the merge operation. In the process of merging each entity copy, Hibernate will cascade the merge operation from each entity copy to its associations withCascadeType.MERGE
orCascadeType.ALL
. The entity state resulting from merging an entity copy will be overwritten when another entity copy is merged.- Since:
- 4.3
- See Also:
- Constant Field Values
- disallow (the default): throws
-
CRITERIA_VALUE_HANDLING_MODE
static final String CRITERIA_VALUE_HANDLING_MODE
By default, criteria queries use bind parameters for any value passed via the JPA Criteria API.- The
"bind"
mode uses bind variables for any literal value. - The
"inline"
mode inlines values as SQL literals.
The default value is
ValueHandlingMode.BIND
.- Since:
- 6.0.0
- See Also:
ValueHandlingMode
, Constant Field Values
- The
-
CRITERIA_COPY_TREE
static final String CRITERIA_COPY_TREE
When enabled, specifies that queries created throughEntityManager.createQuery(CriteriaQuery)
,EntityManager.createQuery(CriteriaUpdate)
orEntityManager.createQuery(CriteriaDelete)
must create a copy of the passed object such that the resultingQuery
is not affected by any mutations to the original criteria query.If disabled, it is assumed that users do not mutate the criteria query afterwards and due to that, no copy will be created, which will improve performance.
When bootstrapping Hibernate through the native bootstrap APIs this setting is disabled i.e. no copies are created to not hurt performance. When bootstrapping Hibernate through the JPA SPI this setting is enabled. When enabled, criteria query objects are copied, as required by the Jakarta Persistence specification.
- Since:
- 6.0
- See Also:
- Constant Field Values
-
JPA_COMPLIANCE
static final String JPA_COMPLIANCE
Specifies a default value for allJpaCompliance
flags. Each individual flag may still be overridden by explicitly specifying its specific configuration property.
-
JPA_TRANSACTION_COMPLIANCE
static final String JPA_TRANSACTION_COMPLIANCE
When enabled, specifies that the HibernateTransaction
should behave according to the semantics defined by the JPA specification for anEntityTransaction
.
-
JPA_QUERY_COMPLIANCE
static final String JPA_QUERY_COMPLIANCE
When enabled, specifies that every query must strictly follow the specified behavior ofQuery
. The affects JPQL queries, criteria queries, and native SQL queries.This setting modifies the behavior of the JPQL query translator, and of the
Query
interface itself. In particular, it forces all methods ofQuery
to throw the exception types defined by the JPA specification.If enabled, any deviations from the JPQL specification results in an exception. Therefore, this setting is not recommended, since it prohibits the use of many useful features of HQL.
-
JPA_LIST_COMPLIANCE
@Deprecated(since="6.0") static final String JPA_LIST_COMPLIANCE
Deprecated.UseDEFAULT_LIST_SEMANTICS
instead. The specification actually leaves this behavior undefined, saying that portable applications should not rely on any specific behavior for aList
with no@OrderColumn
.Controls whether Hibernate should treat what it would usually consider a "bag", that is, a list with no index column, whose element order is not persistent, as a truelist
with an index column and a persistent element order.If enabled, Hibernate will recognize it as a list where the
OrderColumn
annotation is simply missing (and its defaults will apply).
-
JPA_ORDER_BY_MAPPING_COMPLIANCE
static final String JPA_ORDER_BY_MAPPING_COMPLIANCE
JPA specifies that items occurring inOrderBy
lists must be references to entity attributes, whereas Hibernate, by default, allows more complex expressions.If enabled, an exception is thrown for items which are not entity attribute references.
-
JPA_CLOSED_COMPLIANCE
static final String JPA_CLOSED_COMPLIANCE
JPA specifies that anIllegalStateException
must be thrown byEntityManager.close()
andEntityManagerFactory.close()
if the object has already been closed. By default, Hibernate treats any additional call toclose()
as a noop.When enabled, this setting forces Hibernate to throw an exception if
close()
is called on an instance that was already closed.
-
JPA_PROXY_COMPLIANCE
static final String JPA_PROXY_COMPLIANCE
The JPA specification insists that anEntityNotFoundException
must be thrown whenever an uninitialized entity proxy with no corresponding row in the database is accessed. For most programs, this results in many completely unnecessary round trips to the database.Traditionally, Hibernate does not initialize an entity proxy when its identifier attribute is accessed, since the identifier value is already known and held in the proxy instance. This behavior saves the round trip to the database.
When enabled, this setting forces Hibernate to initialize the entity proxy when its identifier is accessed. Clearly, this setting is not recommended.
- Since:
- 5.2.13
- See Also:
JpaCompliance.isJpaProxyComplianceEnabled()
, Constant Field Values
-
JPA_CACHING_COMPLIANCE
static final String JPA_CACHING_COMPLIANCE
By default, Hibernate uses second-level cache invalidation for entities with secondary tables in order to avoid the possibility of inconsistent cached data in the case where different transactions simultaneously update different table rows corresponding to the same entity instance.The JPA TCK, for no good reason, requires that entities with secondary tables be immediately cached in the second-level cache rather than invalidated and re-cached on a subsequent read.
Note that Hibernate's default behavior here is safer and more careful than the behavior mandated by the TCK but YOLO.
When enabled, this setting makes Hibernate pass the TCK.
-
JPA_ID_GENERATOR_GLOBAL_SCOPE_COMPLIANCE
static final String JPA_ID_GENERATOR_GLOBAL_SCOPE_COMPLIANCE
Determines whether the scope of any identifier generator name specified viaTableGenerator.name()
orSequenceGenerator.name()
is considered global to the persistence unit, or local to the entity in which identifier generator is defined.If enabled, the name will be considered globally scoped, and so the existence of two different generators with the same name will be considered a collision, and will result in an exception during bootstrap.
- Since:
- 5.2.17
- See Also:
JpaCompliance.isGlobalGeneratorScopeEnabled()
, Constant Field Values
-
JPA_LOAD_BY_ID_COMPLIANCE
static final String JPA_LOAD_BY_ID_COMPLIANCE
Determines if an identifier value passed toEntityManager.find(java.lang.Class<T>, java.lang.Object)
orEntityManager.getReference(java.lang.Class<T>, java.lang.Object)
may be coerced to the identifier type declared by the entity. For example, anInteger
argument might be widened toLong
.By default, coercion is allowed. When enabled, coercion is disallowed, as required by the JPA specification.
- Since:
- 6.0
- See Also:
JpaCompliance.isLoadByIdComplianceEnabled()
, Constant Field Values
-
TABLE_GENERATOR_STORE_LAST_USED
static final String TABLE_GENERATOR_STORE_LAST_USED
Determines if the identifier value stored in the database table backing a table generator is the last value returned by the identifier generator, or the next value to be returned.By default, the value stored in the database table is the last generated value.
- Since:
- 5.3
- See Also:
- Constant Field Values
-
FAIL_ON_PAGINATION_OVER_COLLECTION_FETCH
static final String FAIL_ON_PAGINATION_OVER_COLLECTION_FETCH
When pagination is used in combination with afetch join
applied to a collection or many-valued association, the limit must be applied in-memory instead of on the database. This typically has terrible performance characteristics, and should be avoided.When enabled, this setting specifies that an exception should be thrown for any query which would result in the limit being applied in-memory.
By default, the exception is disabled, and the possibility of terrible performance is left as a problem for the client to avoid.
- Since:
- 5.2.13
- See Also:
- Constant Field Values
-
IMMUTABLE_ENTITY_UPDATE_QUERY_HANDLING_MODE
static final String IMMUTABLE_ENTITY_UPDATE_QUERY_HANDLING_MODE
This setting defines howImmutable
entities are handled when executing a bulk update query. Valid options are enumerated byImmutableEntityUpdateQueryHandlingMode
:"warning"
specifies that a warning log message is issued when an immutable entity is to be updated via a bulk update statement, and"exception"
specifies that aHibernateException
should be thrown.
By default, a warning is logged.
- Since:
- 5.2.17
- See Also:
ImmutableEntityUpdateQueryHandlingMode
, Constant Field Values
-
IN_CLAUSE_PARAMETER_PADDING
static final String IN_CLAUSE_PARAMETER_PADDING
Determines how parameters occurring in a SQLIN
predicate are expanded. By default, theIN
predicate expands to include sufficient bind parameters to accommodate the specified arguments.However, for database systems supporting execution plan caching, there's a better chance of hitting the cache if the number of possible
IN
clause parameter list lengths is smaller.When this setting is enabled, we expand the number of bind parameters to an integer power of two: 4, 8, 16, 32, 64. Thus, if 5, 6, or 7 arguments are bound to a parameter, a SQL statement with 8 bind parameters in the
IN
clause will be used, and null will be bound to the left-over parameters.- Since:
- 5.2.17
- See Also:
- Constant Field Values
-
QUERY_STATISTICS_MAX_SIZE
static final String QUERY_STATISTICS_MAX_SIZE
This setting controls the number ofQueryStatistics
entries that will be stored by the HibernateStatistics
object.The default value is 5000.
- Since:
- 5.4
- See Also:
- Constant Field Values
-
SEQUENCE_INCREMENT_SIZE_MISMATCH_STRATEGY
static final String SEQUENCE_INCREMENT_SIZE_MISMATCH_STRATEGY
This setting defines theSequenceMismatchStrategy
used when Hibernate detects a mismatch between a sequence configuration in an entity mapping and its database sequence object counterpart.Possible values are
SequenceMismatchStrategy.EXCEPTION
,SequenceMismatchStrategy.LOG
,SequenceMismatchStrategy.FIX
andSequenceMismatchStrategy.NONE
.The default value is
SequenceMismatchStrategy.EXCEPTION
, meaning that an exception is thrown when such a conflict is detected.- Since:
- 5.4
- See Also:
- Constant Field Values
-
PREFERRED_BOOLEAN_JDBC_TYPE
@Incubating static final String PREFERRED_BOOLEAN_JDBC_TYPE
Specifies the preferred JDBC type for storing boolean values. When no type is explicitly specified, a sensibledialect-specific default type code
is used.Can be overridden locally using
JdbcType
,JdbcTypeCode
, and friends.Can also specify the name of the
SqlTypes
constant field, for example,hibernate.type.preferred_boolean_jdbc_type=BIT
.- Since:
- 6.0
- See Also:
- Constant Field Values
-
PREFERRED_UUID_JDBC_TYPE
@Incubating static final String PREFERRED_UUID_JDBC_TYPE
The preferred JDBC type to use for storingUUID
values.Can be overridden locally using
JdbcType
,JdbcTypeCode
, and friends.Can also specify the name of the
SqlTypes
constant field, for example,hibernate.type.preferred_uuid_jdbc_type=CHAR
.- Since:
- 6.0
- See Also:
- Constant Field Values
-
PREFERRED_DURATION_JDBC_TYPE
@Incubating static final String PREFERRED_DURATION_JDBC_TYPE
The preferred JDBC type to use for storing duration values. Falls back toSqlTypes.INTERVAL_SECOND
.Can be overridden locally using
JdbcType
,JdbcTypeCode
, and friends.Can also specify the name of the
SqlTypes
constant field, for example,hibernate.type.preferred_duration_jdbc_type=NUMERIC
.- Since:
- 6.0
- See Also:
- Constant Field Values
-
PREFERRED_INSTANT_JDBC_TYPE
@Incubating static final String PREFERRED_INSTANT_JDBC_TYPE
Specifies the preferred JDBC type for storing instant values. When no type is explicitly specified,SqlTypes.TIMESTAMP_UTC
is used.Can be overridden locally using
JdbcType
,JdbcTypeCode
, and friends.Can also specify the name of the
SqlTypes
constant field, for example,hibernate.type.preferred_instant_jdbc_type=TIMESTAMP
.- Since:
- 6.0
- See Also:
- Constant Field Values
-
JSON_FORMAT_MAPPER
@Incubating static final String JSON_FORMAT_MAPPER
Specifies aFormatMapper
used for JSON serialization and deserialization, either:- an instance of
FormatMapper
, - a
Class
representing a class that implementsFormatMapper
, - the name of a class that implements
FormatMapper
, or - one of the shorthand constants
jackson
orjsonb
.
By default, the first of the possible providers that is available at runtime is used, according to the listing order.
- Since:
- 6.0
- See Also:
SessionFactoryBuilder.applyJsonFormatMapper(FormatMapper)
, Constant Field Values
- an instance of
-
XML_FORMAT_MAPPER
@Incubating static final String XML_FORMAT_MAPPER
Specifies aFormatMapper
used for XML serialization and deserialization, either:- an instance of
FormatMapper
, - a
Class
representing a class that implementsFormatMapper
, - the name of a class that implements
FormatMapper
, or - one of the shorthand constants
jackson
orjaxb
.
By default, the first of the possible providers that is available at runtime is used, according to the listing order.
- Since:
- 6.0.1
- See Also:
SessionFactoryBuilder.applyXmlFormatMapper(FormatMapper)
, Constant Field Values
- an instance of
-
WRAPPER_ARRAY_HANDLING
@Incubating static final String WRAPPER_ARRAY_HANDLING
Configurable control over how to handleByte[]
andCharacter[]
types encountered in the application domain model. Allowable semantics are defined byWrapperArrayHandling
. Accepted values include:WrapperArrayHandling
instance- case-insensitive name of a
WrapperArrayHandling
instance (e.g.allow
)
- Since:
- 6.2
- See Also:
- Constant Field Values
-
TIMEZONE_DEFAULT_STORAGE
static final String TIMEZONE_DEFAULT_STORAGE
Specifies the default strategy for storage of the timezone information for the zoned datetime typesOffsetDateTime
andZonedDateTime
. The possible options for this setting are enumerated byTimeZoneStorageType
.The default is
DEFAULT
, which guarantees that the instant represented by a zoned datetime type is preserved by a round trip to the database. It does not guarantee that the time zone or offset is preserved.For backward compatibility with older versions of Hibernate, set this property to
NORMALIZE
.The default strategy specified using this setting may be overridden using the annotation
TimeZoneStorage
.- Since:
- 6.0
- See Also:
TimeZoneStorageType
,TimeZoneStorage
, Constant Field Values
-
DIALECT_NATIVE_PARAM_MARKERS
@Incubating static final String DIALECT_NATIVE_PARAM_MARKERS
Controls whether to use JDBC markers (`?`) or dialect native markers for parameters within preparable SQL statements.- Since:
- 6.2
- See Also:
ParameterMarkerStrategy
,Dialect.getNativeParameterMarkerStrategy()
, Constant Field Values- Implementation Note:
False
by default, indicating standard JDBC parameter markers (`?`) are used. Set totrue
to use the Dialect's native markers, if any. For Dialects without native markers, the standard JDBC strategy is used.
-
JPA_PERSISTENCE_PROVIDER
@Deprecated static final String JPA_PERSISTENCE_PROVIDER
Deprecated.UseJAKARTA_PERSISTENCE_PROVIDER
insteadSpecifies a class implementingPersistenceProvider
.See JPA 2 sections 9.4.3 and 8.2.1.4
- See Also:
- Constant Field Values
-
JPA_TRANSACTION_TYPE
@Deprecated static final String JPA_TRANSACTION_TYPE
Deprecated.UseJAKARTA_TRANSACTION_TYPE
insteadThe type of transactions supported by the entity managers.See JPA 2 sections 9.4.3 and 8.2.1.2
- See Also:
- Constant Field Values
-
JPA_JTA_DATASOURCE
@Deprecated static final String JPA_JTA_DATASOURCE
Deprecated.UseJAKARTA_JTA_DATASOURCE
insteadThe JNDI name of a JTADataSource
.See JPA 2 sections 9.4.3 and 8.2.1.5
- See Also:
- Constant Field Values
-
JPA_NON_JTA_DATASOURCE
@Deprecated static final String JPA_NON_JTA_DATASOURCE
Deprecated.UseJAKARTA_NON_JTA_DATASOURCE
insteadThe JNDI name of a non-JTADataSource
.See JPA 2 sections 9.4.3 and 8.2.1.5
- See Also:
- Constant Field Values
-
JPA_JDBC_DRIVER
@Deprecated static final String JPA_JDBC_DRIVER
Deprecated.UseJAKARTA_JDBC_DRIVER
insteadThe name of a JDBC driver to use to connect to the database.Used in conjunction with
JPA_JDBC_URL
,JPA_JDBC_USER
andJPA_JDBC_PASSWORD
to specify how to connect to the database.When connections are obtained from a
DataSource
, use eitherJPA_JTA_DATASOURCE
orJPA_NON_JTA_DATASOURCE
instead.See section 8.2.1.9
- See Also:
- Constant Field Values
-
JPA_JDBC_URL
@Deprecated static final String JPA_JDBC_URL
Deprecated.UseJAKARTA_JDBC_URL
insteadThe JDBC connection URL to use to connect to the database.Used in conjunction with
JPA_JDBC_DRIVER
,JPA_JDBC_USER
andJPA_JDBC_PASSWORD
to specify how to connect to the database.When connections are obtained from a
DataSource
, use eitherJPA_JTA_DATASOURCE
orJPA_NON_JTA_DATASOURCE
instead.See section 8.2.1.9
- See Also:
- Constant Field Values
-
JPA_JDBC_USER
@Deprecated static final String JPA_JDBC_USER
Deprecated.UseJAKARTA_JDBC_USER
insteadThe database user to use when connecting via JDBC.Used in conjunction with
JPA_JDBC_DRIVER
,JPA_JDBC_URL
andJPA_JDBC_PASSWORD
to specify how to connect to the database.See section 8.2.1.9
- See Also:
- Constant Field Values
-
JPA_JDBC_PASSWORD
@Deprecated static final String JPA_JDBC_PASSWORD
Deprecated.UseJAKARTA_JDBC_PASSWORD
insteadThe password to use when connecting via JDBC.Used in conjunction with
JPA_JDBC_DRIVER
,JPA_JDBC_URL
andJPA_JDBC_USER
to specify how to connect to the database.See JPA 2 section 8.2.1.9
- See Also:
- Constant Field Values
-
JPA_SHARED_CACHE_MODE
@Deprecated static final String JPA_SHARED_CACHE_MODE
Deprecated.UseJAKARTA_SHARED_CACHE_MODE
insteadUsed to indicate whether second-level (what JPA terms shared cache) caching is enabled as per the rules defined in JPA 2 section 3.1.7.See JPA 2 sections 9.4.3 and 8.2.1.7
- See Also:
SharedCacheMode
, Constant Field Values
-
JPA_SHARED_CACHE_RETRIEVE_MODE
@Deprecated static final String JPA_SHARED_CACHE_RETRIEVE_MODE
Deprecated.UseJAKARTA_SHARED_CACHE_RETRIEVE_MODE
insteadUsed to indicate if the provider should attempt to retrieve requested data in the shared cache.- See Also:
CacheRetrieveMode
, Constant Field Values- API Note:
- This is not a legal property for an
EntityManagerFactory
.
-
JPA_SHARED_CACHE_STORE_MODE
@Deprecated static final String JPA_SHARED_CACHE_STORE_MODE
Deprecated.UseJAKARTA_SHARED_CACHE_STORE_MODE
insteadUsed to indicate if the provider should attempt to store data loaded from the database in the shared cache.- See Also:
CacheStoreMode
, Constant Field Values- API Note:
- This is not a legal property for an
EntityManagerFactory
.
-
JPA_VALIDATION_MODE
@Deprecated static final String JPA_VALIDATION_MODE
Deprecated.UseJAKARTA_VALIDATION_MODE
insteadUsed to indicate what form of automatic validation is in effect as per rules defined in JPA 2 section 3.6.1.1.See JPA 2 sections 9.4.3 and 8.2.1.8
- See Also:
ValidationMode
, Constant Field Values
-
JPA_VALIDATION_FACTORY
@Deprecated static final String JPA_VALIDATION_FACTORY
Deprecated.UseJAKARTA_VALIDATION_FACTORY
insteadUsed to pass along any discovered validator factory.- See Also:
- Constant Field Values
-
JPA_PERSIST_VALIDATION_GROUP
@Deprecated static final String JPA_PERSIST_VALIDATION_GROUP
Deprecated.UseJAKARTA_PERSIST_VALIDATION_GROUP
insteadUsed to coordinate with bean validators.See JPA 2 section 8.2.1.9
- See Also:
- Constant Field Values
-
JPA_UPDATE_VALIDATION_GROUP
@Deprecated static final String JPA_UPDATE_VALIDATION_GROUP
Deprecated.UseJAKARTA_UPDATE_VALIDATION_GROUP
insteadUsed to coordinate with bean validators.See JPA 2 section 8.2.1.9
- See Also:
- Constant Field Values
-
JPA_REMOVE_VALIDATION_GROUP
@Deprecated static final String JPA_REMOVE_VALIDATION_GROUP
Deprecated.UseJAKARTA_REMOVE_VALIDATION_GROUP
insteadUsed to coordinate with bean validators.See JPA 2 section 8.2.1.9
- See Also:
- Constant Field Values
-
JPA_LOCK_SCOPE
@Deprecated static final String JPA_LOCK_SCOPE
Deprecated.UseJAKARTA_LOCK_SCOPE
insteadUsed to request (hint) a pessimistic lock scope.See JPA 2 sections 8.2.1.9 and 3.4.4.3
- See Also:
- Constant Field Values
-
JPA_LOCK_TIMEOUT
@Deprecated static final String JPA_LOCK_TIMEOUT
Deprecated.UseJAKARTA_LOCK_TIMEOUT
insteadUsed to request (hint) a pessimistic lock timeout (in milliseconds).See JPA 2 sections 8.2.1.9 and 3.4.4.3
- See Also:
- Constant Field Values
-
CDI_BEAN_MANAGER
@Deprecated static final String CDI_BEAN_MANAGER
Deprecated.UseJAKARTA_CDI_BEAN_MANAGER
insteadUsed to pass a CDIBeanManager
to Hibernate.According to the JPA specification, the
BeanManager
should be passed at boot time and be ready for immediate use at that time. But not all environments can do this (WildFly, for example). To accommodate such environments, Hibernate provides two options:- A proprietary CDI extension SPI (which has been proposed to the CDI
spec group as a standard option) which can be used to provide delayed
BeanManager
access: to use this solution, the reference passed as theBeanManager
during bootstrap should be typed asExtendedBeanManager
. - Delayed access to the
BeanManager
reference: here, Hibernate will not access the reference passed as theBeanManager
during bootstrap until it is first needed. Note, however, that this has the effect of delaying the detection of any deployment problems until after bootstrapping.
BeanManager
, either directly, or viaExtendedBeanManager
.- See Also:
- Constant Field Values
- A proprietary CDI extension SPI (which has been proposed to the CDI
spec group as a standard option) which can be used to provide delayed
-
FLUSH_MODE
@Deprecated(since="6.2", forRemoval=true) static final String FLUSH_MODE
Deprecated, for removal: This API element is subject to removal in a future version.There are much better ways to control the flush mode of a session, for example,SessionBuilder.flushMode(org.hibernate.FlushMode)
orSession.setHibernateFlushMode(org.hibernate.FlushMode)
.Used to determine flush mode.
-
CFG_XML_FILE
static final String CFG_XML_FILE
- See Also:
- Constant Field Values
-
ORM_XML_FILES
static final String ORM_XML_FILES
- See Also:
- Constant Field Values
-
HBM_XML_FILES
static final String HBM_XML_FILES
- See Also:
- Constant Field Values
-
LOADED_CLASSES
static final String LOADED_CLASSES
- See Also:
- Constant Field Values
-
EVENT_LISTENER_PREFIX
static final String EVENT_LISTENER_PREFIX
Event listener configuration properties follow the patternhibernate.event.listener.eventType packageName.ClassName1, packageName.ClassName2
- See Also:
- Constant Field Values
-
CLASS_CACHE_PREFIX
static final String CLASS_CACHE_PREFIX
Entity cache configuration properties follow the patternhibernate.classcache.packagename.ClassName usage[, region]
whereusage
is the cache strategy used andregion
the cache region name- See Also:
- Constant Field Values
-
COLLECTION_CACHE_PREFIX
static final String COLLECTION_CACHE_PREFIX
Collection cache configuration properties follow the patternhibernate.collectioncache.packagename.ClassName.role usage[, region]
whereusage
is the cache strategy used andregion
the cache region name- See Also:
- Constant Field Values
-
ENHANCER_ENABLE_DIRTY_TRACKING
@Deprecated(forRemoval=true) static final String ENHANCER_ENABLE_DIRTY_TRACKING
Deprecated, for removal: This API element is subject to removal in a future version.Will be removed without replacement. See HHH-15641Enable dirty tracking feature in runtime bytecode enhancement- See Also:
- Constant Field Values
-
ENHANCER_ENABLE_LAZY_INITIALIZATION
@Deprecated(forRemoval=true) static final String ENHANCER_ENABLE_LAZY_INITIALIZATION
Deprecated, for removal: This API element is subject to removal in a future version.Will be removed without replacement. See HHH-15641Enable lazy loading feature in runtime bytecode enhancement- See Also:
- Constant Field Values
-
ENHANCER_ENABLE_ASSOCIATION_MANAGEMENT
static final String ENHANCER_ENABLE_ASSOCIATION_MANAGEMENT
Enable association management feature in runtime bytecode enhancement- See Also:
- Constant Field Values
-
PERSISTENCE_UNIT_NAME
static final String PERSISTENCE_UNIT_NAME
Specifies the name of the persistence unit.- See Also:
- Constant Field Values
-
SESSION_FACTORY_OBSERVER
static final String SESSION_FACTORY_OBSERVER
Specifies a class which implementsSessionFactoryObserver
and has a constructor with no parameters.
-
IDENTIFIER_GENERATOR_STRATEGY_PROVIDER
@Deprecated(since="6.0") static final String IDENTIFIER_GENERATOR_STRATEGY_PROVIDER
Deprecated.useGenerationTypeStrategyRegistration
insteadSpecifies a class which implementsIdentifierGeneratorStrategyProvider
, and has a constructor with no parameters.- See Also:
- Constant Field Values
-
DISCARD_PC_ON_CLOSE
static final String DISCARD_PC_ON_CLOSE
When enabled, specifies that the persistent context should be discarded when eitherSharedSessionContract.close()
orEntityManager.close()
is called.By default, the persistent context is not discarded, as per the JPA specification.
- See Also:
- Constant Field Values
-
VALIDATE_XML
static final String VALIDATE_XML
Whether XML should be validated against their schema as Hibernate reads them.Default is
true
- Since:
- 6.1
- See Also:
- Constant Field Values
-
TRANSFORM_HBM_XML
static final String TRANSFORM_HBM_XML
Enables processinghbm.xml
mappings by transforming them tomapping.xml
and using that processor. Default is false, must be opted-into.- Since:
- 6.1
- See Also:
- Constant Field Values
-
TRANSFORM_HBM_XML_FEATURE_HANDLING
static final String TRANSFORM_HBM_XML_FEATURE_HANDLING
How features in ahbm.xml
file which are not supported for transformation should be handled.Default is
UnsupportedFeatureHandling.ERROR
- Since:
- 6.1
- See Also:
UnsupportedFeatureHandling
, Constant Field Values
-
BULK_ID_STRATEGY_PERSISTENT_TEMPORARY_CREATE_TABLES
static final String BULK_ID_STRATEGY_PERSISTENT_TEMPORARY_CREATE_TABLES
Allows creation of persistent temporary tables at application startup to be disabled. By default, table creation is enabled.- See Also:
- Constant Field Values
-
BULK_ID_STRATEGY_PERSISTENT_TEMPORARY_DROP_TABLES
static final String BULK_ID_STRATEGY_PERSISTENT_TEMPORARY_DROP_TABLES
Allows dropping of persistent temporary tables at application shutdown to be disabled. By default, table dropping is enabled.- See Also:
- Constant Field Values
-
BULK_ID_STRATEGY_GLOBAL_TEMPORARY_CREATE_TABLES
static final String BULK_ID_STRATEGY_GLOBAL_TEMPORARY_CREATE_TABLES
Allows creation of global temporary tables at application startup to be disabled. By default, table creation is enabled.- See Also:
- Constant Field Values
-
BULK_ID_STRATEGY_GLOBAL_TEMPORARY_DROP_TABLES
static final String BULK_ID_STRATEGY_GLOBAL_TEMPORARY_DROP_TABLES
Allows dropping of global temporary tables at application shutdown to be disabled. By default, table dropping is enabled.- See Also:
- Constant Field Values
-
BULK_ID_STRATEGY_LOCAL_TEMPORARY_DROP_TABLES
static final String BULK_ID_STRATEGY_LOCAL_TEMPORARY_DROP_TABLES
Allows dropping of local temporary tables at transaction commit to be enabled. By default, table dropping is disabled, and the database will drop the temporary tables automatically.- See Also:
- Constant Field Values
-
-