Permalink
Browse files

Update addFilterCriteria to filter on integer type

  • Loading branch information...
1 parent 23a16b8 commit 73eda34ee6739251c8c9fc0923860ab2ac25f95c @johan-pap johan-pap committed Sep 19, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 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;
}
}
}

0 comments on commit 73eda34

Please sign in to comment.