public function scheduleForDelete($xmlEntity)
{
$oid = spl_object_hash($xmlEntity);
if (isset($this->entityInsertions[$oid])) {
if ($this->isInIdentityMap($xmlEntity)) {
$this->removeFromIdentityMap($xmlEntity);
}
unset($this->entityInsertions[$oid]);
return;
// entity has not been persisted yet, so nothing more to do.
}
if (!$this->isInIdentityMap($xmlEntity)) {
return;
// ignore
}
$this->removeFromIdentityMap($xmlEntity);
if (isset($this->entityUpdates[$oid])) {
unset($this->entityUpdates[$oid]);
}
if (!isset($this->entityDeletions[$oid])) {
$this->entityDeletions[$oid] = $xmlEntity;
}
}