Skip to content


Subversion checkout URL

You can clone with
Download ZIP


dynamic collection issue #23

merged 1 commit into from

2 participants


Hello Jonathan, there is problem with the dynamic name of collections. For example I have one collection with different postfix, like: books-today, books-yesterday. Please, review this pr.

@a-musing-moose a-musing-moose merged commit a5b33fe into a-musing-moose:master

Hi Jonathan, thank you for describing it.
I have migrated from version 5.x to 5.3 and default document id changed. So, now I should always check md5 with something like: ~^[a-z0-9]{32}$~ and use MongoId instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 7, 2012
  1. @kkamkou

    dynamic collection issue

    kkamkou committed
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/morph/Iterator.php
6 src/morph/Iterator.php
@@ -3,9 +3,10 @@
* @package Morph
* @author Jonathan Moss <>
* @copyright 2009 Jonathan Moss
- * @version SVN: $Id$
namespace morph;
* An iterator to hold results of a query
@@ -86,7 +87,8 @@ private function createObject(array $item)
$class = \get_class($this->type);
$object = new $class;
- $object->__setData($item, Enum::STATE_CLEAN);
+ $object->__setData($item, Enum::STATE_CLEAN)
+ ->collection($this->type->collection());
return $object;
Something went wrong with that request. Please try again.