Permalink
Browse files

Fix createCollection() not returning wrapped collection class.

  • Loading branch information...
jwage committed Feb 7, 2012
1 parent 7d0b4b3 commit 77a005b4daa0ec085e5c980cf9f9822dc025db36
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/Doctrine/MongoDB/Database.php
@@ -125,7 +125,9 @@ public function createCollection($name, $capped = false, $size = 0, $max = 0)
$this->eventManager->dispatchEvent(Events::preCreateCollection, new CreateCollectionEventArgs($this, $name, $capped, $size, $max));
}
- $result = $this->getMongoDB()->createCollection($name, $capped, $size, $max);
+ $this->getMongoDB()->createCollection($name, $capped, $size, $max);
+
+ $result = $this->selectCollection($name);
if ($this->eventManager->hasListeners(Events::postCreateCollection)) {
$this->eventManager->dispatchEvent(Events::postCreateCollection, new EventArgs($this, $prefix));

0 comments on commit 77a005b

Please sign in to comment.