Package org.hibernate.id.enhanced
Class LegacyNamingStrategy
java.lang.Object
org.hibernate.id.enhanced.LegacyNamingStrategy
- All Implemented Interfaces:
ImplicitDatabaseObjectNamingStrategy
Naming strategy which implements the behavior of older versions of
Hibernate, for the most part.
For sequences (including forced-table sequences):
- If "sequence_per_entity_suffix" is specified, a name composed of the "base" name with the specified suffix. The base name depends on the usage of the generator, but is generally the root entity-name if applied to an entity identifier or the table we are generating values for.
-
If annotations are used and
GeneratedValue.generator()
is specified, its value is used as the sequence name. - Fall back is to use "hibernate_sequence".
-
If annotations are used and
GeneratedValue.generator()
is specified, its value is used as the table name. - Fall back is to use "hibernate_sequences".
-
Field Summary
Fields inherited from interface org.hibernate.id.enhanced.ImplicitDatabaseObjectNamingStrategy
DEF_SEQUENCE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondetermineSequenceName
(Identifier catalogName, Identifier schemaName, Map<?, ?> configValues, ServiceRegistry serviceRegistry) Determine the implicit name for an identifier-generator sequencedetermineTableName
(Identifier catalogName, Identifier schemaName, Map<?, ?> configValues, ServiceRegistry serviceRegistry) Determine the implicit name for an identifier-generator table
-
Field Details
-
STRATEGY_NAME
- See Also:
-
-
Constructor Details
-
LegacyNamingStrategy
public LegacyNamingStrategy()
-
-
Method Details
-
determineSequenceName
public QualifiedName determineSequenceName(Identifier catalogName, Identifier schemaName, Map<?, ?> configValues, ServiceRegistry serviceRegistry) Description copied from interface:ImplicitDatabaseObjectNamingStrategy
Determine the implicit name for an identifier-generator sequence- Specified by:
determineSequenceName
in interfaceImplicitDatabaseObjectNamingStrategy
- See Also:
-
determineTableName
public QualifiedName determineTableName(Identifier catalogName, Identifier schemaName, Map<?, ?> configValues, ServiceRegistry serviceRegistry) Description copied from interface:ImplicitDatabaseObjectNamingStrategy
Determine the implicit name for an identifier-generator table- Specified by:
determineTableName
in interfaceImplicitDatabaseObjectNamingStrategy
- See Also:
-