public function addBehavior(Behavior $behavior) {
        $behavior->setRepository($this);

        $this->_behaviors[$behavior->getAlias()] = $behavior;

        $this->attachObject($behavior->getAlias(), $behavior);

        if ($behavior instanceof Listener) {
            $this->on('db', $behavior);
        }

        return $this;
    }