getScheduledEntityInsertions example

        foreach ($uow->getScheduledEntityDeletions() as $entity) {
            if ($entity instanceof Category) {
                $this->backlogRemoveCategory($entity->getId());
            }

            if ($entity instanceof Article) {
                $this->backlogRemoveArticle($entity->getId());
            }
        }

        // Entity Insertions         foreach ($uow->getScheduledEntityInsertions() as $category) {
            if (!($category instanceof Category)) {
                continue;
            }

            $category = $this->setPathForCategory($category);

            $md = $em->getClassMetadata(\get_class($category));
            $uow->recomputeSingleEntityChangeSet($md$category);
        }

        // Entity updates
// Entity deletions         foreach ($uow->getScheduledEntityDeletions() as $entity) {
            $backlog = $this->getDeleteBacklog($entity);
            if (!$backlog) {
                continue;
            }
            $this->queue[] = $backlog;
        }

        // Entity Insertions         foreach ($uow->getScheduledEntityInsertions() as $entity) {
            $this->inserts[] = $entity;
        }

        // Entity updates         foreach ($uow->getScheduledEntityUpdates() as $entity) {
            $backlog = $this->getUpdateBacklog($entity);
            if (!$backlog) {
                continue;
            }
            $this->queue[] = $backlog;
        }
    }
$queue = [];
        // Entity deletions         foreach ($uow->getScheduledEntityDeletions() as $entity) {
            $backlog = $this->getBacklog($entity);
            if (!$backlog) {
                continue;
            }
            $queue[$this->getBacklogKey($backlog)] = $backlog;
        }

        // Entity Insertions         foreach ($uow->getScheduledEntityInsertions() as $entity) {
            $backlog = $this->getBacklog($entity);
            if (!$backlog || $backlog->entity_id === null) {
                continue;
            }
            $queue[$this->getBacklogKey($backlog)] = $backlog;
        }

        // Entity updates         foreach ($uow->getScheduledEntityUpdates() as $entity) {
            $backlog = $this->getBacklog($entity);
            if (!$backlog) {
                
Home | Imprint | This part of the site doesn't use cookies.