[DDC-2074] ManyToManyPersister not found in the chain configured namespaces Created: 12/Oct/12 Updated: 25/Nov/12 Resolved: 25/Nov/12
|Project:||Doctrine 2 - ORM|
|Reporter:||Steffan Harries||Assignee:||Benjamin Eberlei|
The error is: "The class 'Doctrine\ORM\Persisters\ManyToManyPersister' was not found in the chain configured namespaces"
Replicate by making an entity which has a property which is self referencing; e.g. http://docs.doctrine-project.org/en/latest/reference/association-mapping.html#many-to-many-self-referencing .
For example an Album could be related to any other similar albums. An album entity would have a property 'relatedAlbums' which is an ArrayCollection. Similarly, I could be working on a CMS where any piece of content could be related to any other in order to show a "related content" or "related posts" style list on a web page.
Using Symfony 2.1 and a Symfony Form with FormBuilder make sure to use the 'by_reference' => false to call the setter for the property. In the setter for the property: https://gist.github.com/3879169
A similar question has been asked on StackOverflow: http://stackoverflow.com/questions/12077084/doctrine2-manytomany-self-referencing
|Comment by Benjamin Eberlei [ 12/Oct/12 ]|
I need a stacktrace for this error, i have no clue why this happens and where.
|Comment by Steffan Harries [ 15/Oct/12 ]|
The class 'Doctrine\ORM\Persisters\ManyToManyPersister' was not found in the chain configured namespaces Gedmo\Tree\Entity, Gedmo\Translatable\Entity, MyProject\Bundle\AdminBundle\Entity, MyProject\Bundle\Common\SiteBundle\Entity, MyProject\Bundle\Common\ContentBundle\Entity, FOS\UserBundle\Entity
500 Internal Server Error - MappingException
in /opt/local/apache2/htdocs/projects/my-project/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/MappingException.php at line 38
at MappingException ::classNotFoundInNamespaces ('Doctrine\ORM\Persisters\ManyToManyPersister', array('Gedmo\Tree\Entity', 'Gedmo\Translatable\Entity', 'MyProject\Bundle\AdminBundle\Entity', 'MyProject\Bundle\Common\SiteBundle\Entity', 'MyProject\Bundle\Common\ContentBundle\Entity', 'FOS\UserBundle\Entity'))
|Comment by Benjamin Eberlei [ 25/Nov/12 ]|
Ok apparently this is fixed