Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update addFilterCriteria to filter on integer type

  • Loading branch information...
commit 73eda34ee6739251c8c9fc0923860ab2ac25f95c 1 parent 23a16b8
@johan-pap johan-pap authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 QueryBuilder/QueryBuilder.php
View
8 QueryBuilder/QueryBuilder.php
@@ -130,13 +130,17 @@ protected function addFilterCriteria($qb, $criteria)
$qb->andWhere(
$qb->expr()->eq($alias.'.'.$field, $value === 'on' ? 1 : 0)
);
-
- break;
+ break;
case 'entity':
$qb->andWhere(
$qb->expr()->eq($field.'.id', $value->getId())
);
break;
+ case 'integer':
+ $qb->andWhere(
+ $qb->expr()->eq($alias.'.'.$field, (int) $value)
+ );
+ break;
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.