Bug #38381

Doctrine Repository | findAll()-method does not consider $this->defaultOrderings

Added by Vaclav Janoch about 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Should have
Category:
Persistence
Start date:
2012-06-25
Due date:
% Done:

100%

PHP Version:
Has patch:
Yes
Complexity:

Description

The findAll()-method of TYPO3\FLOW3\Persistence\Doctrine\Repository does not consider $this->defaultOrderings. A simple patch could be the following:

File: TYPO3/FLOW3/Persistence/Doctrine/Repository.php

/**
 * Finds all entities in the repository.
 *
 * @return array The entities.
 */
public function findAll() {
    return $this->findBy(array(), $this->defaultOrderings);
}

There might by also another way to set the default orderings.

As #35035 describes that findAll() is inconsitent regarding to the return value, this is also kind of inconsistent, because the TYPO3\FLOW3\Persistence\Repository->findAll()-method does consider the default orderings.


Related issues

Related to TYPO3.Flow - Bug #35035: Doctrine repository findAll is inconsistent Resolved 2012-03-20

Associated revisions

Revision 9825cdbf (diff)
Added by Karsten Dambekalns almost 8 years ago

[BUGFIX] Have Doctrine\Repository::findAll() return a QueryResult

This makes the behavior of Doctrine\Repository consistent and
allows the use of findAll() e.g. in combination with widgets.

With this change, findAll() also observes the default ordering
of a repository.

Change-Id: If24afae617a745d791d5fc81ab070e5d3738a545
Fixes: #35035
Fixes: #38381
Releases: 1.1, 1.2

Revision 93658121 (diff)
Added by Karsten Dambekalns almost 8 years ago

[BUGFIX] Have Doctrine\Repository::findAll() return a QueryResult

This makes the behavior of Doctrine\Repository consistent and
allows the use of findAll() e.g. in combination with widgets.

With this change, findAll() also observes the default ordering
of a repository.

Change-Id: If24afae617a745d791d5fc81ab070e5d3738a545
Fixes: #35035
Fixes: #38381
Releases: 1.1, 1.2

History

#1 Updated by Karsten Dambekalns about 8 years ago

  • Status changed from New to Accepted

#3 Updated by Gerrit Code Review about 8 years ago

  • Status changed from Accepted to Under Review

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12365

#4 Updated by Karsten Dambekalns about 8 years ago

  • Target version changed from 1.1 RC1 to 1.1

#5 Updated by Gerrit Code Review almost 8 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12365

#6 Updated by Gerrit Code Review almost 8 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12365

#7 Updated by Gerrit Code Review almost 8 years ago

Patch set 1 for branch FLOW3-1.1 has been pushed to the review server.
It is available at http://review.typo3.org/12873

#8 Updated by Karsten Dambekalns almost 8 years ago

  • Status changed from Under Review to Resolved
  • Target version changed from 1.1 to 1.1 RC2
  • % Done changed from 0 to 100

Also available in: Atom PDF