Skip to content

Commit

Permalink
Merge pull request #237 from ArsSirek/master
Browse files Browse the repository at this point in the history
resetScope for FindOne
  • Loading branch information
Sammaye committed Nov 5, 2014
2 parents 8a379eb + b32b17e commit 17624fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions EMongoDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 17624fe

Please sign in to comment.