mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-950: Selecting entities in random order #1180
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Dec 26, 2010).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user enumag:
I need some way to select a random row from a table. There was something like "ORDER BY RAND()" in SQL but I can't really find anything like that for Doctrine.
@doctrinebot commented on GitHub (Dec 27, 2010):
Comment created by @beberlei:
Doctrine allows you to execute SQL and hydrate objects from that using the Native Query API as described in the documentation.
@doctrinebot commented on GitHub (Dec 27, 2010):
Issue was closed with resolution "Won't Fix"
@doctrinebot commented on GitHub (Jun 10, 2011):
Comment created by darkangel:
I need this as well ... why can't we do something like:
Or maybe something at a lower level, like:
?
@doctrinebot commented on GitHub (May 3, 2012):
Comment created by petersvp:
I need this as well! ORDER BY RAND() or something like this is a MUST HAVE for Doctrine! I do NOT want to fetch ALL then Hydrate ALL to select some rows, nor I want to do 2 queries in a row! Also, last one method actually can return 2 SAME records....
Hope I see this soon. I'm using Symfony 2
@doctrinebot commented on GitHub (Jan 29, 2014):
Comment created by daslicht:
+1 Please add this feature