public DomainTypeBasicConfiguration createNonManagedDomainTypeConfiguration(Class<?> domainType) {
JpaRepository repository = new SimpleJpaRepository(domainType, entityManager);
PersistentEntity persistentEntity = mappingContext.getPersistentEntity(domainType);
DefaultEntityMetadataConfigurationUnitBuilder builder = new DefaultEntityMetadataConfigurationUnitBuilder(domainType);
builder.nameExtractor(EntityNameExtractorFactory.forPersistentEntity(persistentEntity));
return new NonManagedDomainTypeConfiguration(builder.build(), persistentEntity, repository);
}