79627145

Date: 2025-05-18 03:59:02
Score: 0.5
Natty:
Report link

In symfony 6 or higher, this can be handled without managing multiple doctrine connections:

$isolatedEm = new EntityManager(
    conn: $entityManager->getConnection(),
    config: $entityManager->getConfiguration(),
    eventManager: $entityManager->getEventManager(),
);

// get original data using $isolatedEm
// do what you need with data

$isolatedEm->close();

I needed this to accurately compare normalized data before and after changes. I don't know if this will work with all DBs, I am using postgres.

Reasons:
  • Blacklisted phrase (0.5): I need
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Ashley