aboutsummaryrefslogtreecommitdiffstats
path: root/core/namespace/ORM/Repository.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/namespace/ORM/Repository.php')
-rw-r--r--core/namespace/ORM/Repository.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/namespace/ORM/Repository.php b/core/namespace/ORM/Repository.php
index 868a60b..58ccf97 100644
--- a/core/namespace/ORM/Repository.php
+++ b/core/namespace/ORM/Repository.php
@@ -207,8 +207,12 @@ abstract class Repository {
if(!empty($filter)) {
foreach($filter as $column => $value) {
- $wheres[] = "$column = ?";
- $params[] = $value;
+ if($value === NULL) {
+ $wheres[] = "$column IS NULL";
+ } else {
+ $wheres[] = "$column = ?";
+ $params[] = $value;
+ }
}
$where = 'WHERE '.implode(' AND ', $wheres);