spring – hibernate 5 naming strategy configuration

I think I found the solution. To achieve my goal, I used hibernate.physical_naming_strategy configuration, instead of hibernate.implicit_naming_strategy. I created an implementation of the PhysicalNamingStrategy interface which simulates part of the functionality of the original ImprovedNamingStrategy class: package fms.util.hibernate; import org.apache.commons.lang.StringUtils; import org.hibernate.boot.model.naming.Identifier; import org.hibernate.boot.model.naming.PhysicalNamingStrategy; import org.hibernate.engine.jdbc.env.spi.JdbcEnvironment; public class ImprovedNamingStrategy implements PhysicalNamingStrategy { @Override public Identifier … Read more

ImprovedNamingStrategy no longer working in Hibernate 5

Thanks for posting your own solution. It helps me so much to set Hibernate 5 naming strategy! The hibernate.ejb.naming_strategy property of pre-Hibernate 5.0 seems split into two parts: hibernate.physical_naming_strategy hibernate.implicit_naming_strategy The values of these properties do not implement the NamingStrategy interface as did hibernate.ejb.naming_strategy. There are two new interfaces for these purposes: org.hibernate.boot.model.naming.PhysicalNamingStrategy org.hibernate.boot.model.naming.ImplicitNamingStrategy Hibernate … Read more

Hibernate 5 :- org.hibernate.MappingException: Unknown entity

I have fixed the same issue with Hibernate 5. There is a problem in this code Configuration configuration = new Configuration(); configuration.configure(); ServiceRegistry sr = new StandardServiceRegistryBuilder().applySettings( configuration.getProperties()).build(); SessionFactory sf = configuration.buildSessionFactory(sr); This code works fine for Hibernate 4.3.5, but the same code has the same issue for Hibernate 5. When you do configuration.buildSessionFactory(sr), using … Read more