Affects Version/s: None
Fix Version/s: None
Security Level: All
I would like to know if the only one thing i need to save an entity in a lifecycle listener is the $unitOfWork->scheduleForInsert($entity).
My requirement is to save a log in every action in the DB. So i need to save the old entity and the new entity in the DB. I am making this in the preupdate listener:
$log = $this->util->createLog($entity->serialize(),"Current Object");
$unitOfWork = $this->wrapped->getUnitOfWork();
But this log is never saved. Do i need something else to persist this new entity?.
Thanks for your help.