Need help setting up doctrine 2 cascade deletes
Posted
by
jiewmeng
on Stack Overflow
See other posts from Stack Overflow
or by jiewmeng
Published on 2010-12-31T15:18:37Z
Indexed on
2011/01/03
13:53 UTC
Read the original article
Hit count: 172
doctrine2
I am quite confused setting up cascade deletes in Doctrine 2. Here's what my setup looks like
I want to setup cascading so that I can do something like $list->getStages()->clear()
I tried in Stage class
/**
* @OneToMany(targetEntity="TaskProgress", mappedBy="stage", cascade={"remove"})
*/
protected $taskStages;
But that did nothing, I even tried putting the same thing in other classes like List, TaskProgress or Task but nothing seem to work, I may have done it wrong tho ..
© Stack Overflow or respective owner