HHH-18486 Prioritize custom name-resolvers before defaulting to dynamic
This commit is contained in:
parent
1ae633b5c6
commit
70137e7f09
|
@ -30,15 +30,15 @@ public class CoordinatingEntityNameResolver implements EntityNameResolver {
|
||||||
return entityName;
|
return entityName;
|
||||||
}
|
}
|
||||||
|
|
||||||
final MappingMetamodelImplementor mappingMetamodel = sessionFactory.getRuntimeMetamodels().getMappingMetamodel();
|
for ( EntityNameResolver resolver : sessionFactory.getSessionFactoryOptions().getEntityNameResolvers() ) {
|
||||||
for ( EntityNameResolver resolver : mappingMetamodel.getEntityNameResolvers() ) {
|
|
||||||
entityName = resolver.resolveEntityName( entity );
|
entityName = resolver.resolveEntityName( entity );
|
||||||
if ( entityName != null ) {
|
if ( entityName != null ) {
|
||||||
return entityName;
|
return entityName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( EntityNameResolver resolver : sessionFactory.getSessionFactoryOptions().getEntityNameResolvers() ) {
|
final MappingMetamodelImplementor mappingMetamodel = sessionFactory.getRuntimeMetamodels().getMappingMetamodel();
|
||||||
|
for ( EntityNameResolver resolver : mappingMetamodel.getEntityNameResolvers() ) {
|
||||||
entityName = resolver.resolveEntityName( entity );
|
entityName = resolver.resolveEntityName( entity );
|
||||||
if ( entityName != null ) {
|
if ( entityName != null ) {
|
||||||
return entityName;
|
return entityName;
|
||||||
|
|
Loading…
Reference in New Issue