Skip to content

Commit

Permalink
Removing commented code.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwage committed Feb 21, 2011
1 parent b529535 commit efade32
Showing 1 changed file with 0 additions and 52 deletions.
52 changes: 0 additions & 52 deletions lib/Doctrine/ODM/MongoDB/UnitOfWork.php
Expand Up @@ -1109,58 +1109,6 @@ private function getCommitOrder(array $documentChangeSet = null)
return $calc->getCommitOrder();
}

/*
private function getCommitOrder(array $entityChangeSet = null)
{
if ($entityChangeSet === null) {
$entityChangeSet = array_merge(
$this->entityInsertions,
$this->entityUpdates,
$this->entityDeletions
);
}
$calc = $this->getCommitOrderCalculator();
// See if there are any new classes in the changeset, that are not in the
// commit order graph yet (dont have a node).
$newNodes = array();
foreach ($entityChangeSet as $oid => $entity) {
$className = get_class($entity);
if ( ! $calc->hasClass($className)) {
$class = $this->em->getClassMetadata($className);
$calc->addClass($class);
$newNodes[] = $class;
}
}
// Calculate dependencies for new nodes
foreach ($newNodes as $class) {
foreach ($class->associationMappings as $assoc) {
if ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) {
$targetClass = $this->em->getClassMetadata($assoc['targetEntity']);
if ( ! $calc->hasClass($targetClass->name)) {
$calc->addClass($targetClass);
}
$calc->addDependency($targetClass, $class);
// If the target class has mapped subclasses,
// these share the same dependency.
if ($targetClass->subClasses) {
foreach ($targetClass->subClasses as $subClassName) {
$targetSubClass = $this->em->getClassMetadata($subClassName);
if ( ! $calc->hasClass($subClassName)) {
$calc->addClass($targetSubClass);
}
$calc->addDependency($targetSubClass, $class);
}
}
}
}
}
return $calc->getCommitOrder();
}
*/
/**
* Add dependencies recursively through embedded documents. Embedded documents
* may have references to other documents so those need to be saved first.
Expand Down

0 comments on commit efade32

Please sign in to comment.