Skip to content

Commit

Permalink
Attaching extra conditions to the association query before the
Browse files Browse the repository at this point in the history
beforeFind event is triggered
  • Loading branch information
lorenzo committed Mar 23, 2014
1 parent 2677069 commit 3f32562
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ORM/Association.php
Expand Up @@ -428,10 +428,10 @@ public function attachTo(Query $query, array $options = []) {
}
}

$dummy->where($options['conditions']);
$this->_dispatchBeforeFind($dummy);

$joinOptions = ['table' => 1, 'conditions' => 1, 'type' => 1];
$dummy->where($options['conditions']);
$options['conditions'] = $dummy->clause('where');
$query->join([$target->alias() => array_intersect_key($options, $joinOptions)]);

Expand Down

0 comments on commit 3f32562

Please sign in to comment.