Add rand ordering

This commit is contained in:
Ruben 2016-11-01 21:23:29 +01:00
parent a013a23ea1
commit ec07837833

View file

@ -57,6 +57,23 @@ class Application {
// $em_config->setQueryCacheImpl(new \Doctrine\Common\Cache\ApcuCache());
// $em_config->setResultCacheImpl(new \Doctrine\Common\Cache\ApcuCache());
// $em_config->setMetadataCacheImpl(new \Doctrine\Common\Cache\ApcuCache());
$em_config->setCustomNumericFunctions(array(
'ACOS' => 'DoctrineExtensions\Query\Mysql\Acos',
'ASIN' => 'DoctrineExtensions\Query\Mysql\Asin',
'ATAN' => 'DoctrineExtensions\Query\Mysql\Atan',
'ATAN2' => 'DoctrineExtensions\Query\Mysql\Atan2',
'BIT_COUNT' => 'DoctrineExtensions\Query\Mysql\BitCount',
'BIT_XOR' => 'DoctrineExtensions\Query\Mysql\BitXor',
'COS' => 'DoctrineExtensions\Query\Mysql\Cos',
'COT' => 'DoctrineExtensions\Query\Mysql\Cot',
'DEGREES' => 'DoctrineExtensions\Query\Mysql\Degrees',
'LOG10' => 'DoctrineExtensions\Query\Mysql\Log10',
'RADIANS' => 'DoctrineExtensions\Query\Mysql\Radians',
'STDDEV' => 'DoctrineExtensions\Query\Mysql\StdDev',
'SIN' => 'DoctrineExtensions\Query\Mysql\Sin',
'TAN' => 'DoctrineExtensions\Query\Mysql\Tan',
'RAND' => 'DoctrineExtensions\Query\Mysql\Rand',
));
$connectionConfig = new Configuration();
$connectionParams = array(
@ -92,6 +109,8 @@ class Application {
$_em->getEventManager()->addEventSubscriber(new \Gedmo\SoftDeleteable\SoftDeleteableListener());
$_em->getEventManager()->addEventSubscriber(new \Gedmo\Timestampable\TimestampableListener());
$this->em = $_em;
}