mandango/mandango — pull request #29 by denis-isaev (2012-10-08 08:42:43+00:00)
Title: Generator's infinite loop fix

When we try to generate classes for nested embedded documents:
````php
'Model\Parent' => array(
'fields' => array(
'foo' => 'string',
),
'embeddedsMany' => array(
'nodes' => array('class' => 'Model\NestedChild'),
),
),
'Model\NestedChild' => array(
'isEmbedded' => true,
'fields' => array(
'foo' => 'string',
),
'embeddedsMany' => array(
'nodes' => array('class' => 'Model\NestedChild'), # Self-emdebbed model cause an inifnite loop.
),
),
````
generator go into infinite loop.

This commit fix it.