diff --git a/EMongoDocument.php b/EMongoDocument.php index 216423df..f4e38a19 100644 --- a/EMongoDocument.php +++ b/EMongoDocument.php @@ -1281,7 +1281,7 @@ public function search($caseSensitive = false) $this->setDbCriteria($criteria); - return $this; + return new EMongoDocumentDataProvider($this); } /**