فهرست منبع

When deleint a question score the questionScoreNames will be deleted (Thanks to the cascade option)

Julio Montoya 11 سال پیش
والد
کامیت
3a032b4bd8
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      main/inc/Entity/QuestionScore.php

+ 3 - 1
main/inc/Entity/QuestionScore.php

@@ -23,7 +23,9 @@ class QuestionScore
     private $name;
 
     /**
-     * @ORM\OneToMany(targetEntity="QuestionScoreName", mappedBy="questionScore")
+     * cascade options remove: Cascades remove operations to the associated entities.
+     *                 detach: Cascades detach operations to the associated entities.
+     * @ORM\OneToMany(targetEntity="QuestionScoreName", mappedBy="questionScore", cascade={"persist", "remove"} )
      */
     private $items;