Skip to content

Commit

Permalink
Repeating previous fix for HasMany associations.
Browse files Browse the repository at this point in the history
This makes appveyor happy
  • Loading branch information
lorenzo committed Dec 31, 2015
1 parent 63e6329 commit c8ccdf5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/ORM/Association/DependentDeleteTrait.php
Expand Up @@ -44,8 +44,7 @@ public function cascadeDelete(EntityInterface $entity, array $options = [])
$conditions = array_combine($foreignKey, $entity->extract($bindingKey));

if ($this->_cascadeCallbacks) {
$query = $this->find('all')->where($conditions);
foreach ($query as $related) {
foreach ($this->find()->where($conditions)->toList() as $related) {
$table->delete($related, $options);
}
return true;
Expand Down

0 comments on commit c8ccdf5

Please sign in to comment.