protected function scanEntities()
    {
        $app = $this->app;

        // get classes
        $classes = $app['datamapper.classfinder']->getClassesFromNamespace($app['config']['datamapper.models_namespace']);

        // build metadata
        $metadata = $app['datamapper.entity.scanner']->scan($classes, $app['config']['datamapper.namespace_tablenames'], $app['config']['datamapper.morphclass_abbreviations']);

        // generate eloquent models
        $app['datamapper.eloquent.generator']->generate($metadata, false);

        // build schema
        $app['datamapper.schema.builder']->update($metadata, false);
    }