doctrine - entity attribute is null in postRemoveHandler -


i have problem doctrine events. if use remove() method, id of entity correctly set in preremovehandler-function, null in preremovehandler-function:

/**  * @orm\entity  * @orm\table(name="media")  * @orm\haslifecyclecallbacks  */ class media extends tabledefault{       /**      * @orm\id      * @orm\column(name="id", type="integer")      * @orm\generatedvalue(strategy="auto")      * @jms\groups({"edit","login", "search"})      */     public $id;    ...   ...   ...      /**      * @orm\preremove      */     public function preremovehandler($dsed,$evre) {            $this->id not null     }       /**      * @orm\postremove      */     public function postremovehandler($dsed,$evre) {         $this->id null       } 

in doctrine documentation, there following note on postremove:

note postremove event or events triggered after entity removal can receive uninitializable proxy in case have configured entity cascade remove relations. in case, should load proxy in associated pre event.

does know "load proxy in associated pre event" means?

thanks! ore


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

angular - Copying node modules to wwwroot AspNetCore -