public function getNextTableBehavior()
    {
        // order the behaviors according to Behavior::$tableModificationOrder
        $behaviors = array();
        foreach ($this->getTables() as $table) {
            foreach ($table->getBehaviors() as $behavior) {
                if (!$behavior->isTableModified()) {
                    $behaviors[$behavior->getTableModificationOrder()][] = $behavior;
                }
            }
        }
        ksort($behaviors);
        foreach ($behaviors as $behaviorList) {
            foreach ($behaviorList as $behavior) {
                return $behavior;
            }
        }
    }