Skip to content
Permalink
Browse files

Takes into account the current recursive value in deleteAll().

  • Loading branch information...
bancer committed Jun 7, 2017
1 parent 910d045 commit 2677cf4053e3ce2c36539ebf9fd856e7cd3dca3f
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Cake/Model/Model.php
@@ -2832,12 +2832,12 @@ public function deleteAll($conditions, $cascade = true, $callbacks = false) {
if (!$cascade && !$callbacks) {
return $db->delete($this, $conditions);
}
$recursive = min($this->recursive, 0);
$ids = $this->find('all', array_merge(array(
'fields' => "{$this->alias}.{$this->primaryKey}",
'order' => false,
'group' => "{$this->alias}.{$this->primaryKey}",
'recursive' => 0), compact('conditions'))
'recursive' => $recursive), compact('conditions'))
);
if ($ids === false || $ids === null) {

0 comments on commit 2677cf4

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.