|
@@ 39-43 (lines=5) @@
|
| 36 |
|
|
| 37 |
|
//workaround for possible oid collisions in UnitOfWork |
| 38 |
|
//see http://www.doctrine-project.org/jira/browse/DDC-2785 |
| 39 |
|
if ($this->em->getUnitOfWork()->getEntityState($entity) != UnitOfWork::STATE_NEW) { |
| 40 |
|
connection::log()->warning('oid collision during create detected, detaching ' . spl_object_hash($entity)); |
| 41 |
|
$this->em->detach($entity); |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
$this->em->persist($entity); |
| 45 |
|
$this->em->flush($entity); |
| 46 |
|
$this->em->detach($entity); |
|
@@ 105-109 (lines=5) @@
|
| 102 |
|
|
| 103 |
|
//workaround for possible oid collisions in UnitOfWork |
| 104 |
|
//see http://www.doctrine-project.org/jira/browse/DDC-2785 |
| 105 |
|
if ($this->em->getUnitOfWork()->getEntityState($copy) != UnitOfWork::STATE_DETACHED) { |
| 106 |
|
connection::log()->warning('oid collision during delete detected, detaching ' . spl_object_hash($copy)); |
| 107 |
|
$this->em->detach($copy); |
| 108 |
|
} |
| 109 |
|
|
| 110 |
|
$copy = $this->em->merge($copy); |
| 111 |
|
$this->kill_potential_proxies($copy); |
| 112 |
|
$copy->metadata_deleted = true; |