Skip to content

Instantly share code, notes, and snippets.

@bakura10 bakura10/foo.php
Created Jan 25, 2015

Embed
What would you like to do?
<?php
class UserController
{
/**
* @var EntityManagerInterface
*/
private $entityManager;
public function create()
{
$user = ...;
$this->entityManager->transactional(function() {
$this->service1->create($user);
$this->service2->create($user);
});
}
}
@stefanorg

This comment has been minimized.

Copy link

stefanorg commented Jan 26, 2015

@bakura10 when a transactional operation involves more than one table/entity?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.