From c460c8686dbe8d07e0140687ad0c123695495f1c Mon Sep 17 00:00:00 2001 From: Sergey Aksenov Date: Fri, 4 Aug 2017 19:58:40 +0300 Subject: [PATCH] Documenting caveat Using something like `$tree->children(1)->where(['field' => 'value'])` looks valid, but breaks functionality completely. --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index a8df22c..45a4734 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,12 @@ class MenuQuery extends \yii\db\ActiveQuery NestedSetsQueryBehavior::className(), ]; } + + public function where($condition) { + // Do not allow to break behavior magic + return parent::andWhere($condition); + } + } ```