浏览代码

Add a complementary on doctrine orphan removal option

Thomas Rabaix 13 年之前
父节点
当前提交
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!
 -------------------------------