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

Add a complementary on doctrine orphan removal option

Thomas Rabaix преди 14 години
родител
ревизия
09a9ff8b4f
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      Resources/doc/doctrine_orm/troubleshootings.rst

+ 4 - 0
Resources/doc/doctrine_orm/troubleshootings.rst

@@ -16,6 +16,7 @@ Make sure the Orphan Removal option is set to ``true``
                 field="galleryHasMedias"
                 target-entity="Application\Sonata\MediaBundle\Entity\GalleryHasMedia"
                 mapped-by="gallery"
+                orphan-removal="true"
                 >
 
                 <orphan-removal>true</orphan-removal>
@@ -26,6 +27,9 @@ Make sure the Orphan Removal option is set to ``true``
         </entity>
     </doctrine-mapping>
 
+.. note::
+
+    The last Doctrine version requires to define the ``orphan-removal`` as an attribute and not as a node.
 
 Ordered fields are not ordered!
 -------------------------------