Package org.hibernate.boot.model.naming
Class ImplicitNamingStrategyLegacyJpaImpl
java.lang.Object
org.hibernate.boot.model.naming.ImplicitNamingStrategyJpaCompliantImpl
org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl
- All Implemented Interfaces:
Serializable
,ImplicitNamingStrategy
Implementation of the ImplicitNamingStrategy contract which conforms to the
naming rules initially implemented by Hibernate for JPA 1.0, prior to many
things being clarified.
For a more JPA 2 compliant strategy, see/use ImplicitNamingStrategyJpaCompliantImpl
Corresponds roughly to the legacy org.hibernate.cfg.EJB3NamingStrategy class.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ImplicitNamingStrategyLegacyJpaImpl
Singleton access -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionJPA states we should use the following as default: The concatenation of the name of the containing entity and the name of the collection attribute, separated by an underscore. That is, if owning entity has a JPA entity name:JPA states we should use the following as default: If there is a "referencing relationship property": The concatenation of the following: the name of the referencing relationship property or field of the referencing entity or embeddable class;_
; the name of the referenced primary key column. If there is no such "referencing relationship property", or if the association is an element collection: The concatenation of the following: the name of the entity;_
; the name of the referenced primary key columnJPA states we should use the following as default: The concatenated names of the two associated primary entity tables (owning side first), separated by an underscore. That is:Methods inherited from class org.hibernate.boot.model.naming.ImplicitNamingStrategyJpaCompliantImpl
determineAnyDiscriminatorColumnName, determineAnyKeyColumnName, determineBasicColumnName, determineDiscriminatorColumnName, determineForeignKeyName, determineIdentifierColumnName, determineIndexName, determineListIndexColumnName, determineMapKeyColumnName, determinePrimaryKeyJoinColumnName, determinePrimaryTableName, determineTenantIdColumnName, determineUniqueKeyName, toIdentifier, transformAttributePath, transformEntityName
-
Field Details
-
INSTANCE
Singleton access
-
-
Constructor Details
-
ImplicitNamingStrategyLegacyJpaImpl
public ImplicitNamingStrategyLegacyJpaImpl()
-
-
Method Details
-
determineCollectionTableName
Description copied from class:ImplicitNamingStrategyJpaCompliantImpl
JPA states we should use the following as default:The concatenation of the name of the containing entity and the name of the collection attribute, separated by an underscore.
That is, if owning entity has a JPA entity name:{OWNER JPA ENTITY NAME}_{COLLECTION ATTRIBUTE NAME}
otherwise:{OWNER ENTITY NAME}_{COLLECTION ATTRIBUTE NAME}
- Specified by:
determineCollectionTableName
in interfaceImplicitNamingStrategy
- Overrides:
determineCollectionTableName
in classImplicitNamingStrategyJpaCompliantImpl
- Parameters:
source
- The source information- Returns:
- The implicit table name.
-
determineJoinTableName
Description copied from class:ImplicitNamingStrategyJpaCompliantImpl
JPA states we should use the following as default:The concatenated names of the two associated primary entity tables (owning side first), separated by an underscore.
That is:{OWNING SIDE PRIMARY TABLE NAME}_{NON-OWNING SIDE PRIMARY TABLE NAME}
- Specified by:
determineJoinTableName
in interfaceImplicitNamingStrategy
- Overrides:
determineJoinTableName
in classImplicitNamingStrategyJpaCompliantImpl
- Parameters:
source
- The source information- Returns:
- The implicit table name.
-
determineJoinColumnName
Description copied from class:ImplicitNamingStrategyJpaCompliantImpl
JPA states we should use the following as default:- If there is a "referencing relationship property":
The concatenation of the following: the name of the referencing relationship property or field of the referencing entity or embeddable class;
_
; the name of the referenced primary key column. - If there is no such "referencing relationship property",
or if the association is an element collection:
The concatenation of the following: the name of the entity;
_
; the name of the referenced primary key column
- Specified by:
determineJoinColumnName
in interfaceImplicitNamingStrategy
- Overrides:
determineJoinColumnName
in classImplicitNamingStrategyJpaCompliantImpl
- Parameters:
source
- The source information- Returns:
- The determined join column name
- If there is a "referencing relationship property":
-