org.hibernate.jpa.internal.metamodel.MetamodelImpl is only intended to be used internally by Hibernate and should not be used by applications. There is internal code that assumes that the mapping is by entity name, not JPA entity name.