When Metamodel is created based on hbm xml file mapping then wrong entity name is set for MetamodelImpl#entityPersisterMap comparing with annotation based one.
Because of that it is impossible to get entity persister by its class for any entity that has configred entity-name in hbm xml file.
After all this one leads to nasty:
After deep debugging we found that in org.hibernate.boot.model.source.internal.hbm.ModelBinder which is responsible for creation of bindings based on hbm xml files entity-name xml attribute is assigned to PersistenceClass#entityName class mapping:
in opposite to org.hibernate.cfg.annotations.EntityBinder where a class name is assigned to PersistenceClass#entityName