- java.lang.Object
-
- org.hibernate.cfg.ImprovedNamingStrategy
-
- org.springframework.boot.orm.jpa.hibernate.SpringNamingStrategy
-
- All Implemented Interfaces:
- Serializable, org.hibernate.cfg.NamingStrategy
public class SpringNamingStrategy
extends org.hibernate.cfg.ImprovedNamingStrategy
Hibernate NamingStrategy
that follows Spring recommended
naming conventions. Naming conventions implemented here are identical to
ImprovedNamingStrategy
with the exception that foreign key columns include the
referenced column name.
- Since:
- 1.2.0
- Author:
- Phillip Webb
- See Also:
- "http://stackoverflow.com/questions/7689206/ejb3namingstrategy-vs-improvednamingstrategy-foreign-key-naming",
Serialized Form
-
-
Field Summary
-
Fields inherited from class org.hibernate.cfg.ImprovedNamingStrategy
INSTANCE
-
Method Summary
-
Methods inherited from class org.hibernate.cfg.ImprovedNamingStrategy
addUnderscores, classToTableName, collectionTableName, columnName, joinKeyColumnName, logicalCollectionColumnName, logicalCollectionTableName, logicalColumnName, propertyToColumnName, tableName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
foreignKeyColumnName
public String foreignKeyColumnName(String propertyName,
String propertyEntityName,
String propertyTableName,
String referencedColumnName)
- Specified by:
foreignKeyColumnName
in interface org.hibernate.cfg.NamingStrategy
- Overrides:
foreignKeyColumnName
in class org.hibernate.cfg.ImprovedNamingStrategy
Copyright © 2015 Pivotal Software, Inc.. All rights reserved.