Closed andreysubbotin closed 2 years ago
Minimal reproducible example
Company
name
description
Create listener for EntityChangedEvent
EntityChangedEvent
@EventListener(phase = TransactionPhase.BEFORE_COMMIT) public void beforeCommit(EntityChangedEvent<Company, UUID> event) { Company company = transactionalDataManager.load(event.getEntityId()) .view(View.BASE) .optional() .orElse(null); if (event.getType() == EntityChangedEvent.Type.CREATED) { if (company != null) { company.setDescription(company.getName()); transactionalDataManager.save(company, companyLog); } } }
Environment
Description of the bug or enhancement
Minimal reproducible example
Company
entity withname
anddescription
attributes.Create listener for
EntityChangedEvent
Company
entity.Company
entity. Fill onlyname
attribute.name
anddescription
attributes.name
attribute. Thedescription
attribute that was changed by listener, was not registered in EntityLog.