public function attachCollection(CollectionAbstract $collection)
    {
        $id = $collection->getId();

        if (isset($this->_collections[$id])) {
            throw new \InvalidArgumentException('Collection already attached: ' . $id);
        }

        $this->_collections[$id] = $collection;
        $this->clearSchema();

        $this->getLogger()->debug('Collection attached', array('collection' => $id));

        return $this;
    }