public function getSchemaByType($modelClass)
    {
        if (array_key_exists($modelClass, $this->schemaInstances) === true) {
            return $this->schemaInstances[$modelClass];
        }

        if ($this->hasSchemaForModelClass($modelClass) === false) {
            throw new InvalidArgumentException("Schema was not registered for model '$modelClass'.");
        }

        $schemaClass = $this->model2schemaMap[$modelClass];
        $schema      = new $schemaClass($this->factory, $this);

        $this->schemaInstances[$modelClass] = $schema;

        return $schema;
    }