diff --git a/EMongoDocument.php b/EMongoDocument.php index 0a2342c..0f7dc30 100644 --- a/EMongoDocument.php +++ b/EMongoDocument.php @@ -838,11 +838,11 @@ public function findOne($criteria = array(), $fields = array()) $cache->set($cacheKey, array($record), $this->getDbConnection()->queryCachingDuration, $this->getDbConnection()->queryCachingDependency); } } - + + $this->resetScope(false); if($record === null){ return null; } - $this->resetScope(false); return $this->populateRecord($record, true, $project === array() ? false : true); }