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