public function refreshEntities()
    {

        $metadatas = $this->clearCacheAndProxies();

        // Finally, we update the schema
        $tool = new SchemaTool($this->entityManager);
        $tool->updateSchema($metadatas, true);
    }