AdminBundle bug

3,477 views
Skip to first unread message

Михаил Кулебякин

unread,
Jul 26, 2012, 8:10:52 AM7/26/12
to sonata...@googlegroups.com
For ManyToMany relation
When try to add Entity

No entity manager defined for class Doctrine\Common\Collections\ArrayCollection

500 Internal Server Error - RuntimeException

When try to edit:

o entity manager defined for class Doctrine\ORM\PersistentCollection

500 Internal Server Error - RuntimeException

Stack Trace

  1. in ...vendor/sonata-project/doctrine-orm-admin-bundle/Sonata/DoctrineORMAdminBundle/Model/ModelManager.php at line 203

symfony 2.1
sonata: master

Михаил Кулебякин

unread,
Jul 26, 2012, 8:18:46 AM7/26/12
to sonata...@googlegroups.com
  protected function configureFormFields(FormMapper $formMapper)
    {
->add('authors', 'sonata_type_model',
            array(
                'label' => 'Авторы',
                'by_reference'=>false,
                'expanded' => true,
                'compound' => true)
        );

четверг, 26 июля 2012 г., 16:10:52 UTC+4 пользователь Михаил Кулебякин написал:

Thomas Rabaix

unread,
Jul 26, 2012, 6:56:47 PM7/26/12
to sonata...@googlegroups.com
you cannot add a sonata_type_model to a collection. This type only works for one to one or many to one.

--
You received this message because you are subscribed to the Google Groups "sonata-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/sonata-users/-/Jnq1f6TYFi4J.

To post to this group, send email to sonata...@googlegroups.com.
To unsubscribe from this group, send email to sonata-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sonata-users?hl=en.



--
Thomas Rabaix
http://rabaix.net | http://sonata-project.org

Михаил Кулебякин

unread,
Jul 27, 2012, 3:17:50 AM7/27/12
to sonata...@googlegroups.com, tho...@rabaix.net
Looked to sonata news bundle and found solution


 ->add('authors', 'sonata_type_model',
            array(

                'label' => 'Авторы',
                'by_reference' => false,
                'multiple' => true,
                'expanded' => true,

            ));




пятница, 27 июля 2012 г., 2:56:47 UTC+4 пользователь Thomas Rabaix написал:
To unsubscribe from this group, send email to sonata-users+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/sonata-users?hl=en.
Reply all
Reply to author
Forward
0 new messages