I want save new entity after update object (Save history data).
I try add object to EntityManager and flush in preUpdate event, but i have recursion effect.
I want save new entity after update object (Save history data).
I try add object to EntityManager and flush in preUpdate event, but i have recursion effect.
You are probably calling EntityManager#flush
within a lifecycle event: this is not supported and it will obviously lead to infinite recursion problems.