public function factory($collection)
    {
        if ($collection instanceof Collection) {
            $collectionName = $collection->getName();
        } else {
            $collectionName = $collection;
        }

        if (!isset($this->collections[$collectionName])) {
            if (!($collection instanceof Collection)) {
                $collection = Norm::createCollection(array(
                    'name' => $collection,
                    'connection' => $this,
                ));

                $this->applyHook('norm.after.factory', $collection);
            }

            $this->collections[$collectionName] = $collection;
        }

        return $this->collections[$collectionName];
    }