rabin 1 year ago
parent
commit
7067391cec
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/Dever/Store/Mongo.php

+ 2 - 3
src/Dever/Store/Mongo.php

@@ -289,10 +289,9 @@ class Mongo extends Base
                         $result[$k] = $this->where($k, $v);
                     }
                 }
-            } elseif (is_numeric($param)) {
-                $result['id'] = $this->where('id', $param);
             } elseif ($param) {
-                $result['_id'] = $this->where('_id', $param);
+                $pk = '_id';
+                $result[$pk] = $this->where($pk, $param);
             } else {
                 $result = $param;
             }