Skip to content

Commit

Permalink
Fixed: #111
Browse files Browse the repository at this point in the history
  • Loading branch information
Sammaye committed Sep 3, 2013
1 parent d3c8607 commit 3994f1a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion EMongoDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,8 @@ public function equals($record)
*/
public function findOne($criteria = array(), $fields = array()){
$this->trace(__FUNCTION__);

$this->beforeFind(); // Apparently this is applied before even scopes...

if($criteria instanceof EMongoCriteria)
$criteria = $criteria->getCondition();
Expand Down Expand Up @@ -650,7 +652,9 @@ public function findAllByPk($pk, $fields = array()){
*/
public function find($criteria = array(), $fields = array()){
$this->trace(__FUNCTION__);


$this->beforeFind(); // Apparently this is applied before even scopes...

if($criteria instanceof EMongoCriteria){
$c = $criteria->mergeWith($this->getDbCriteria())->toArray();
$criteria = array();
Expand Down

0 comments on commit 3994f1a

Please sign in to comment.