Преглед на файлове

Fix doctrine persistent collections not serializing

The problem was that the collection handler was only dealing with ArrayCollection
Baldur Rensch преди 12 години
родител
ревизия
f236e2e03c
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      Serializer/Handler/ArrayCollectionHandler.php

+ 1 - 1
Serializer/Handler/ArrayCollectionHandler.php

@@ -17,7 +17,7 @@ class ArrayCollectionHandler implements SubscribingHandlerInterface
     {
         $methods = array();
         $formats = array('json', 'xml', 'yml');
-        $collectionTypes = array('ArrayCollection', 'Doctrine\Common\Collections\ArrayCollection');
+        $collectionTypes = array('ArrayCollection', 'Doctrine\Common\Collections\ArrayCollection', 'Doctrine\ORM\PersistentCollection');
 
         foreach ($collectionTypes as $type) {
             foreach ($formats as $format) {