add person detection improvement: inversion firstName<->lastName

This commit is contained in:
2016-01-18 22:30:57 +01:00
parent 90f579d88a
commit d70be5ea85
2 changed files with 28 additions and 1 deletions

View File

@@ -302,7 +302,9 @@ class PersonController extends Controller
$dql = 'SELECT p from ChillPersonBundle:Person p WHERE '
. 'LOWER(p.firstName) LIKE LOWER(:firstName)'
. ' OR LOWER(p.lastName) LIKE LOWER(:lastName)';
. ' OR LOWER(p.lastName) LIKE LOWER(:lastName)'
. ' OR LOWER(p.firstName) LIKE LOWER(:lastName)'
. ' OR LOWER(p.lastName) LIKE LOWER(:firstName)';
$query->setParameter('firstName', $form['firstName']->getData())
->setParameter('lastName', $form['lastName']->getData());