Feature #9534

RAND as order posibility

Added by Julian Kleinhans about 11 years ago. Updated about 10 years ago.

Status:
Rejected
Priority:
Could have
Assignee:
-
Category:
Persistence
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
Complexity:

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..

#1

Updated by Karsten Dambekalns about 11 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 10 years ago

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

#4

Updated by Christian Müller about 10 years ago

  • Status changed from New to Rejected

As stated, with doctrine no longer an issue.

Also available in: Atom PDF