I would like to list all the entities that are about to be persisted through an INSERT
wen flush()
ing , therefore assosiated with a NEW
state.
Is that possible? Thank you
Yes, it's possible. getScheduledEntityInsertions()
returns scheduled entity insertions for UoW object.
So just call $entityManager->getUnitOfWork()->getScheduledEntityInsertions()