| Thank you @ChrisCranford for your response. I forgot to mention that the existing code used 4.2.2 (updated the description of the issue); the code gets the instances using Iterator<PersistentClass> classMappings = configuration.getClassMappings(), and it used to store all PersistentClasses even for entities with the same entity names (as is happening when we have classes with same unqualified class names). I've also tried with 5.3.7.Final (which doesn't include https://hibernate.atlassian.net/browse/HHH-13060), and weirdly enough the code also works. I tried: Iterator<PersistentClass> classMappings = metadata.getEntityBindings().iterator(); while (classMappings.hasNext()) { PersistentClass mapping = classMappings.next(); System.out.println("class name: " + mapping.getClassName() + ", entity name: " + mapping.getEntityName()); } and it prints: class name: model1.MyPojo, entity name: model1.MyPojo class name: model2.MyPojo, entity name: model2.MyPojo The weird thing for me is that the entity name used to be the FQCN (I'm not setting a "name" value in the Entity annotation on the entity classes). So it seemed that before 5.4.0, the entity names were the FQCNs? @Entity @Table(name = "POJO1") public class MyPojo { |