public function runUpdate($XML) { $IDs = array(); $XML->lCV3(); while ($t = $XML->getNextEntry()) { $ac = new anyC(); $ac->setCollectionOf("Patch"); $ac->addAssocV3("PatchNummer", "=", $t->A("PatchNummer")); $P = $ac->getNextEntry(); if ($P == null) { $IDs[] = $t->newMe(); } else { $nP = new Patch($P->getID()); $AS = $t->getA(); unset($AS->PatchID); $nP->setA($AS); $nP->saveMe(); $IDs[] = $P->getID(); } } return $IDs; }