diff --git a/lib/Doctrine/Hydrate/Record.php b/lib/Doctrine/Hydrate/Record.php index e3830c6d3..40377efac 100644 --- a/lib/Doctrine/Hydrate/Record.php +++ b/lib/Doctrine/Hydrate/Record.php @@ -108,7 +108,7 @@ class Doctrine_Hydrate_Record extends Doctrine_Object public function flush() { // take snapshots from all initialized collections - foreach (array_unique($this->_collections) as $key => $coll) { + foreach ($this->_collections as $key => $coll) { $coll->takeSnapshot(); } foreach ($this->_tables as $table) { diff --git a/tests/run.php b/tests/run.php index dfebd5057..fb65fe6dc 100644 --- a/tests/run.php +++ b/tests/run.php @@ -176,6 +176,8 @@ $test->addTestCase(new Doctrine_Relation_TestCase()); //$test->addTestCase(new Doctrine_Relation_Access_TestCase()); //$test->addTestCase(new Doctrine_Relation_ManyToMany_TestCase()); +$test->addTestCase(new Doctrine_Relation_ManyToMany2_TestCase()); + $test->addTestCase(new Doctrine_Relation_OneToMany_TestCase());