public function commitEntities(&$failed = null)
    {
        if ($ret = parent::commitEntities($failed)) {
            $ids = array();

            foreach ($this->_entities as $entity) {
                if ($entity->getEntityState() ==  AnDomain::STATE_DESTROYED) {
                    if (is($entity, 'ComBaseDomainEntityNode')) {
                        $ids[] = $entity->id;
                    }
                }
            }

            if (!empty($ids)) {
                $this->cleanupNodesWithIds($ids);
            }
        }

        return $ret;
    }