diff --git a/src/ngrest/base/NgRestModel.php b/src/ngrest/base/NgRestModel.php index f180a74e7..7212ae692 100644 --- a/src/ngrest/base/NgRestModel.php +++ b/src/ngrest/base/NgRestModel.php @@ -110,7 +110,7 @@ public function extraFields() /** * Attach behaviors to the Active Query. * - * Attach behaviours to every new {{\luya\admin\ngrest\base\NgRestActiveQuery}} on find() and ngRestFind(). + * Attach behaviours to every new {{\luya\admin\ngrest\base\NgRestActiveQuery}} on find() but **not ngRestFind()**. * Returns a list of behaviors that the query component should behave as. * * As behavior methods can be access from the inner class, use full functions can be used inside the active query. @@ -546,13 +546,7 @@ public function ngRestRelations() */ public static function ngRestFind() { - $config = []; - - foreach (static::findActiveQueryBehaviors() as $name => $class) { - $config['as ' . $name] = $class; - } - - return new NgRestActiveQuery(static::class, $config); + return new NgRestActiveQuery(static::class); } /**