1
0
mirror of synced 2025-01-18 22:41:43 +03:00

Fixed IBM DB2 Platform to support locking

This commit is contained in:
Benjamin Eberlei 2010-05-02 13:18:47 +02:00
parent b8402c9563
commit c3303881a9
2 changed files with 6 additions and 0 deletions

View File

@ -513,4 +513,9 @@ class DB2Platform extends AbstractPlatform
{
return strtoupper($column);
}
public function getForUpdateSQL()
{
return ' WITH RR USE AND KEEP UPDATE LOCKS';
}
}

View File

@ -101,6 +101,7 @@ class LockAgentWorker
$cache = new \Doctrine\Common\Cache\ArrayCache();
$config->setMetadataCacheImpl($cache);
$config->setQueryCacheImpl($cache);
$config->setSQLLogger(new \Doctrine\DBAL\Logging\EchoSQLLogger());
$em = \Doctrine\ORM\EntityManager::create($conn, $config);