semsem
semsem

Reputation: 1192

Symfony ORM PostRemove with soft deletable

I have an entity category and another entity article joined with cat_id and cascaded remove.

The category entity is softDeleteable

When i try to delete a category, the default behaviour is to delete related articles because they are cascaded onDelete.

I want to detect the doctrine orm event PostRemove in the entity article if i soft deleted the parent category of the article.

The doctrine can't detect PostRemove ORM event in the article entity and only detect PreRemove event.

When i disable softDeleteable extension it works fine, but i want to use it.

Upvotes: 3

Views: 1913

Answers (1)

Matteo
Matteo

Reputation: 39370

You can listen to the following events:

on the Category entity.

Hope this help

Upvotes: 4

Related Questions