private Configuration buildConfiguration() {
		Configuration result;
		Metamodel metamodel;
		Collection<EntityType<?>> entities;
		Collection<EmbeddableType<?>> embeddables;
		
		result = new Configuration();		
		metamodel = entityManagerFactory.getMetamodel();
				
		entities = metamodel.getEntities();
		for (EntityType<?> entity : entities) 
			result.addAnnotatedClass(entity.getJavaType());
		
		embeddables = metamodel.getEmbeddables();
		for (EmbeddableType<?> embeddable : embeddables) 
			result.addAnnotatedClass(embeddable.getJavaType());
		
		return result;
	}