Feature #9534

RAND as order posibility

Added by Julian Kleinhans almost 5 years ago. Updated almost 4 years ago.

Status:Rejected Start date:
Priority:Could have Due date:
Assigned To:- % Done:

0%

Category:Persistence
Target version:-
PHP Version: Complexity:
Has patch:

Description

It would be cool to have a possibilty to get randomize data.. for example

$query = $this->createQuery();
return $query->matching($query->equals('X', $x))
             ->setOrderings(array('date' => \F3\FLOW3\Persistence\QueryInterface::ORDER_RAND))
             ->setLimit($limit)
             ->execute();

or

$query = $this->createQuery();
return $query->matching($query->equals('X', $x))
             ->randomizeResult()
             ->setLimit($limit)
             ->execute();

actually you cant randomize BEVORE the query executes, so you cant set a limit, must select all results and randomize per plain php code..

History

#1 Updated by Karsten Dambekalns almost 5 years ago

  • Priority changed from Should have to Could have
  • Target version deleted (1.0 alpha 12)
  • Start date deleted (2010-08-31)

#3 Updated by Julian Kleinhans over 4 years ago

Please close..
with Doctrine no problem, this issue is from time before doctrine

#4 Updated by Christian Müller almost 4 years ago

  • Status changed from New to Rejected

As stated, with doctrine no longer an issue.

Also available in: Atom PDF