Skip to content

Commit

Permalink
Update BeforeQueryTrait.php
Browse files Browse the repository at this point in the history
  • Loading branch information
mazurva committed Mar 6, 2016
1 parent 6993dc0 commit 6b65970
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions BeforeQueryTrait.php
Expand Up @@ -18,8 +18,11 @@ public static function find()
$condition = array_merge($condition, $property->getValue($obj));
}
}
if($obj->hasAttribute($obj->removedAttribute))
return (new \sibds\behaviors\TrashQuery($obj))->findRemoved()->andFilterWhere($condition);

if ($obj->hasAttribute($obj->removedAttribute))
return (new DynamicQuery($obj))->findRemoved()->andFilterWhere($condition);
elseif ($obj->isNestedSet())
return (new DynamicQuery($obj))->andFilterWhere($condition);
else
return parent::find()->andFilterWhere($condition);
}
Expand Down

0 comments on commit 6b65970

Please sign in to comment.