EntityChangedEvent deleting entity only works with Soft Delete

Hi,
Events that support entity deletion only work when the entity has Soft Delete set up.

 @EventListener
    open fun onDocumentChangedBeforeCommit(event: EntityChangedEvent<Document>) {
}

When no Soft Delete is set, the above function is not performed.

Regards
Marcin

Hi Marcin.

Can’t reproduce your case. Listener works with Soft- and non-Soft Delete entity.

What Jmix version do you use?
Can you provide sample project with this issue?

Regard,
Ivan

Hi,
JMIX v.2.2.1
I found the cause of the problem. After uninstalling the Audit add-on, the problem disappeared. It is probably blocking the further transmission of the event in some way.

Redards
Marcin

Thanks.

Reproduced with installed Audit addon.
But stop reproducing after Audit being removed and re-installed.
We will investigate this case.

Does your entity (Document) have Audit setup?

Regards,
Ivan

No, entity does not have Audit setup.

Hi.

Have an issue with stable reproducing.

What was your list of Jmix addons besides Audit?

If you are able to provide us some sample project with this issue - that would be great.

Regards,
Ivan

Hi.
However, I need to analyze this case myself, because I discovered that the events for deleting some entities (such as User) work correctly, but not for others.

Regards
Marcin

List of addons:
Zrzut ekranu z 2024-04-08 10-57-13