Explorar o código

Add a complementary on doctrine orphan removal option

Thomas Rabaix %!s(int64=13) %!d(string=hai) anos
pai
achega
09a9ff8b4f
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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!
 -------------------------------