1
0
mirror of synced 2025-01-06 00:57:10 +03:00

Fix PostgreSQL test-failure. UnitOfWork#getEntityState() produced exists() queries because of unmanaged entity passed as parameter to AbstractQuery#setParameter(), thereby skewing the sql count

This commit is contained in:
Benjamin Eberlei 2012-07-08 16:57:08 +02:00
parent 5adc8bec58
commit eaae1f222f

View File

@ -70,12 +70,10 @@ class HydrationCacheTest extends OrmFunctionalTestCase
public function testHydrationParametersSerialization()
{
$cache = new ArrayCache();
$user = new CmsUser();
$user->id = 1;
$dql = "SELECT u FROM Doctrine\Tests\Models\Cms\CmsUser u WHERE u.id = ?1";
$query = $this->_em->createQuery($dql)
->setParameter(1, $user)
->setParameter(1, $userId = 1)
->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache));
$query->getResult();