beforeCommit EntityChangedEvent listener problem

Hi all!
Problem was raised also but wasn’t solved:
https://www.cuba-platform.ru/discuss/t/cannot-publish-entitychangedevent/4696

Reproduced on test project. I created 2 entities: department and organization. Department may have a parent (other department) and a organization.
Business logic realized so if organization of parent department is changed - organizations of all departments with this parent will also be changed to this organization. Business logic realized by beforeCommit EntityChangedEvent listener with TransactionalDataManager. It works well but in terminal I have warnings:

18:04:28.241 WARN  c.h.c.c.s.p.EntityChangedEventManager   - Cannot publish EntityChangedEvent for com.company.listeners.entity.Department-e56824ce-f977-7d9e-5bbd-b0bec69b0c62 [detached] because its AttributeChangeListener is null
18:04:28.246 WARN  c.h.c.c.s.p.EntityChangedEventManager   - Cannot publish EntityChangedEvent for com.company.listeners.entity.Department-e56824ce-f977-7d9e-5bbd-b0bec69b0c62 [detached] because its AttributeChangeListener is null

This warning is for changed parent department. What is wrong?
Platform version 7.2.7
Test project attached:
listeners.rar (10.9 MB)

Hi,

It’s fixed in CUBA 7.2.8, see Get rid of "Cannot publish EntityChangedEvent for XYZ because its AttributeChangeListener is null" warning log message · Issue #3030 · cuba-platform/cuba · GitHub

1 Like

It’s solved. Thank you