diff --git a/Search/PersonSearch.php b/Search/PersonSearch.php index 812fea242..b970e0462 100644 --- a/Search/PersonSearch.php +++ b/Search/PersonSearch.php @@ -99,7 +99,8 @@ class PersonSearch extends AbstractSearch $dql = 'SELECT p FROM ChillPersonBundle:Person p' . ' WHERE' . ' LOWER(p.firstName) like LOWER(:q)' - . ' OR LOWER(p.lastName) like LOWER(:q)'; + . ' OR LOWER(p.lastName) like LOWER(:q)' + . 'ORDER BY p.lastName, p.firstName'; $query = $this->om->createQuery($dql) ->setParameter('q', '%'.trim($pattern).'%')