Pre-save action


What is the correct way to have pre-persist code called when a given entity is saved?
The repository + save override is not suitable for linked entities : if you have A & B, with A containing a collection of Bs, isn’t called when B entities are persisted through the save of A.
Is there a simple way to add lifecycle listeners?



This requirement can be achieved using Entity Listener defined for Entity B. Detail guide is provided here : Models :: Axelor Documentation

Thank you.