protected function getEntityMapInstanceFor($entity)
    {
        // First, we'll try to load the entity map from cache, to
        // save from time consuming parsing of the relationships
        $entityMap = $this->getEntityMapInstanceFromCache($entity);

        if ($entityMap !== null) {
            return $entityMap;
        }

        if (class_exists($entity.'Map')) {
            $map = $entity.'Map';
            $map = new $map();

            return $map;
        }

        if ($map = $this->getMapFromNamespaces($entity)) {
            return $map;
        }

        if ($this->strictMode) {
            throw new EntityMapNotFoundException("No Map registered for $entity");
        }

        $map = $this->getNewEntityMap();

        return $map;
    }