Permalink
Browse files

Update lib/Doctrine/Common/DataFixtures/Executor/MongoDBExecutor.php

When loading fixtures with MongoDB the indexes are getting dropped on purging the collections.

Added the proper command to update the Indexes right after the purging, to ensure consistency
  • Loading branch information...
1 parent 779c3df commit 6e12d48b748e8b6368bb3ac0d188bf903859add4 @weyandch committed Jul 26, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/Doctrine/Common/DataFixtures/Executor/MongoDBExecutor.php
@@ -76,6 +76,7 @@ public function execute(array $fixtures, $append = false)
{
if ($append === false) {
$this->purge();
+ $this->getObjectManager()->getSchemaManager()->updateIndexes();
}
foreach ($fixtures as $fixture) {
$this->load($this->dm, $fixture);

0 comments on commit 6e12d48

Please sign in to comment.