Hibernate use qualified class name as entity's name. However JPA use unqualified class name as entity's name. Before version 5.2, I can transform them by entity class. From version 5.2, class meta data is deprecated in hibernate, we can only get jpa's meta model which using unqualified class name by public api. However, other hibernate module and hibernate core internal still use old qualified entity name. We are unable to get this qualified entity name from hibernate public api now. But with other hibernate module, we still need them. We need a api to transform the jpa entity name to hibernate entity name.
That information is still there, its just available through a SPI now rather than necessarily a public API
Is there a solution without getMetamodel？ getMetamodel does not exist in version 5.1.x. I need a method to get this information compatible with both version 5.1 and 5.2
A slight variant to my prior answer, as this code exists on both releases as-is:
While this method is deprecated in 5.2, it does exist in 5.1 allowing you to use a single code path without any reflection.
As a heads up, I would expect these deprecated methods being removed in 6.0.
In the end I decided to use reflections. By the way, will caching related method objects with static fields result in memory leaks?