Browse Source

Merge pull request #6587 from PGBI/triggerbeforefind

3.0 - Made code "dryer"
José Lorenzo Rodríguez 11 years ago
parent
commit
2a7e9a2731
1 changed files with 1 additions and 3 deletions
  1. 1 3
      src/ORM/Association.php

+ 1 - 3
src/ORM/Association.php

@@ -629,9 +629,7 @@ abstract class Association
      */
     protected function _dispatchBeforeFind($query)
     {
-        $table = $this->target();
-        $options = $query->getOptions();
-        $table->dispatchEvent('Model.beforeFind', [$query, new \ArrayObject($options), false]);
+        $query->triggerBeforeFind();
     }
 
     /**