public function testRequiredClassesAddToChildrenInvalidOnUpdate()
{
$post = new CmsBlogPost();
$post->name = 'hello';
$postFolder = new CmsBlogFolder();
$postFolder->id = '/functional/posts';
$postFolder->posts = new ArrayCollection(array($post));
$this->dm->persist($postFolder);
$this->dm->flush();
$this->dm->clear();
$postFolder = $this->dm->find(null, '/functional/posts');
$post = new CmsBlogInvalidChild();
$post->name = 'wolrd';
$postFolder->posts->add($post);
$this->dm->persist($postFolder);
$this->dm->flush();
$this->dm->clear();
}