Add rand ordering
This commit is contained in:
parent
a013a23ea1
commit
ec07837833
1 changed files with 19 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue