Merge branch 'DDC-1612'
This commit is contained in:
commit
44831f21c1
@ -390,7 +390,7 @@ class UnitOfWork implements PropertyChangedListener
|
|||||||
*/
|
*/
|
||||||
private function computeSingleEntityChangeSet($entity)
|
private function computeSingleEntityChangeSet($entity)
|
||||||
{
|
{
|
||||||
if ( ! $this->isInIdentityMap($entity) ) {
|
if ( $this->getEntityState($entity) !== self::STATE_MANAGED) {
|
||||||
throw new \InvalidArgumentException("Entity has to be managed for single computation " . self::objToStr($entity));
|
throw new \InvalidArgumentException("Entity has to be managed for single computation " . self::objToStr($entity));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1141,6 +1141,21 @@ class BasicFunctionalTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
|||||||
$this->_em->flush($user);
|
$this->_em->flush($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group DDC-720
|
||||||
|
* @group DDC-1612
|
||||||
|
*/
|
||||||
|
public function testFlushSingleNewEntity()
|
||||||
|
{
|
||||||
|
$user = new CmsUser;
|
||||||
|
$user->name = 'Dominik';
|
||||||
|
$user->username = 'domnikl';
|
||||||
|
$user->status = 'developer';
|
||||||
|
|
||||||
|
$this->_em->persist($user);
|
||||||
|
$this->_em->flush($user);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @group DDC-720
|
* @group DDC-720
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user