public function loadEntitiesFrom($directory) {
        $metadata = $this->app['config']['doctrine.managers.default.paths'];
        $metadata[] = $directory;
        $this->app['config']->set('doctrine.managers.default.paths', $metadata);
    }