How can we edit manually final SQL query before execution in Symfony / Doctrine?
I need to change value MANUALLY in SQL, i know i can edit it postPersist in entity, but i'm in a special case that this solution is not working in my schema .
A small idea :
public function preFlush/onFlush/PostFlush((PreFlushEventArgs/.../...) $eventArgs) {
$em = $eventArgs->getEntityManager();
$uow = $em->getUnitOfWork();
foreach ($uow->getScheduledEntityInsertions() as $entity) {
if($entity instanceof MyEntity) {
//Change my value directly in SQL query
}
}
}