sonata-project/SonataAdminBundle — pull request #1860 by EmmanuelVella (2013-12-16 11:38:40+00:00)
Title: Fix "many" parent append

Example : We have a many-to-many relation between ``Post`` and ``Tag``. ``TagAdmin`` is a child of ``PostAdmin``, and the ``TagAdmin::getParentAssociationMapping()`` method will return ``posts``.

Currently, as ``parent`` is ``Post`` object, the ``propertyAccessor`` will call ``$tag->setPosts($post);`` which is incorrect. This PR appends the parent as an array if necessary, so the ``propertyAccessor`` will call ``$tag->addPost($post)`` instead.