Details
Description
In the Doctrine 2.1 versions the method EntityRepository::findBy() accepts additional parameters for ordering, limit and offset.
Great feature! (While waiting for it I extended the EntityRepository class and implemented these parameters myself using a QueryBuilder.)
It would be nice for the method EntityRepository::findOneBy() to accept an additional parameter for ordering as well. It could use the following signature:
public function findOneBy(array $criteria, array $orderBy = null);
This would be useful for various cases, for example: finding the newest blog-post.
And maybe update EntityRepository::findAll() as well with the signature:
public function findAll(array $orderBy = null);
Looking forward to your thoughts.
Activity
Benjamin Eberlei
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Fix Version/s | 2.x [ 10090 ] | |
| Fix Version/s | 2.1 [ 10022 ] |
Benjamin Eberlei
made changes -
| Status | Open [ 1 ] | In Progress [ 3 ] |
Benjamin Eberlei
made changes -
| Status | In Progress [ 3 ] | Resolved [ 5 ] |
| Fix Version/s | 2.1 [ 10022 ] | |
| Resolution | Fixed [ 1 ] |
Benjamin Eberlei
made changes -
| Resolution | Fixed [ 1 ] | |
| Status | Resolved [ 5 ] | Reopened [ 4 ] |
Benjamin Eberlei
made changes -
| Fix Version/s | 2.2-DEV [ 10157 ] | |
| Fix Version/s | 2.1 [ 10022 ] | |
| Fix Version/s | 2.x [ 10090 ] |
Guilherme Blanco
made changes -
| Fix Version/s | 2.x [ 10090 ] | |
| Fix Version/s | 2.2 [ 10157 ] |
Benjamin Eberlei
made changes -
| Workflow | jira [ 12767 ] | jira-feedback [ 14102 ] |
Benjamin Eberlei
made changes -
| Workflow | jira-feedback [ 14102 ] | jira-feedback2 [ 15966 ] |
Benjamin Eberlei
made changes -
| Workflow | jira-feedback2 [ 15966 ] | jira-feedback3 [ 18220 ] |
Fabio B. Silva
made changes -
| Status | Reopened [ 4 ] | Resolved [ 5 ] |
| Fix Version/s | 2.x [ 10090 ] | |
| Resolution | Fixed [ 1 ] |
Benjamin Eberlei
made changes -
| Fix Version/s | 2.3.1 [ 10323 ] |
This list may be incomplete, as errors occurred whilst retrieving source from linked applications:
- Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DDC-1241, expand=changesets[-21:-1].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)
I can't seem to find the implementation of this even though this issue has been resolved. Is this possible?