You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unlike findBy, Doctrine\ODM\MongoDB\Repository\DocumentRepository::findOneBy does not currently support $sort as a parameter.
Current
/**
* Finds a single document by a set of criteria.
*/
public function findOneBy(array $criteria) : ?object
{
return $this->getDocumentPersister()->load($criteria);
}
Propose adding support for $sort:
/**
* Finds a single document by a set of criteria.
*/
public function findOneBy(array $criteria, ?array $sort = null) : ?object
{
return $this->getDocumentPersister()->load($criteria, null, [], 0, $sort);
}
The text was updated successfully, but these errors were encountered:
Feature Request
Summary
Unlike
findBy
,Doctrine\ODM\MongoDB\Repository\DocumentRepository::findOneBy
does not currently support$sort
as a parameter.Current
Propose adding support for $sort:
The text was updated successfully, but these errors were encountered: