@@ -231,7 +231,7 @@ class Contact extends ExtendContact implements Taggable, EmailOwnerInterface
231231 * @var Collection
232232 *
233233 * @ORM\OneToMany(targetEntity="OroCRM\Bundle\ContactBundle\Entity\ContactEmail",
234- * mappedBy="owner", cascade={"persist"}
234+ * mappedBy="owner", cascade={"all"}, orphanRemoval=true
235235 * )
236236 * @ORM\OrderBy({"primary" = "DESC"})
237237 * @Soap\ComplexType("OroCRM\Bundle\ContactBundle\Entity\ContactEmail[]", nillable=true)
@@ -242,7 +242,7 @@ class Contact extends ExtendContact implements Taggable, EmailOwnerInterface
242242 * @var Collection
243243 *
244244 * @ORM\OneToMany(targetEntity="OroCRM\Bundle\ContactBundle\Entity\ContactPhone", mappedBy="owner",
245- * mappedBy="owner", cascade={"persist"}
245+ * mappedBy="owner", cascade={"all"}, orphanRemoval=true
246246 * ))
247247 * @ORM\OrderBy({"primary" = "DESC"})
248248 * @Soap\ComplexType("OroCRM\Bundle\ContactBundle\Entity\ContactPhone[]", nillable=true)
@@ -318,7 +318,7 @@ class Contact extends ExtendContact implements Taggable, EmailOwnerInterface
318318 * @var Collection
319319 *
320320 * @ORM\OneToMany(targetEntity="OroCRM\Bundle\ContactBundle\Entity\ContactAddress",
321- * mappedBy="owner", cascade={"persist"}
321+ * mappedBy="owner", cascade={"all"}, orphanRemoval=true
322322 * )
323323 * @ORM\OrderBy({"primary" = "DESC"})
324324 */
0 commit comments