Skip to content
Permalink
Browse files

Make check more strict to respect existing queries

  • Loading branch information...
mvdriel committed Jul 26, 2016
1 parent d6e4513 commit c01525f2cc5fbef111ddad0c97b011dcb3b9b139
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/Cake/Model/Datasource/Database/Mysql.php
@@ -438,8 +438,9 @@ public function delete(Model $model, $conditions = null) {
$alias = $joins = false;
}
$complexConditions = false;
$fields = array_keys($this->describe($model));
foreach ((array)$conditions as $key => $value) {
if (strpos($key, '.') !== false && strpos($key, $model->alias) === false) {
if (strpos($key, $model->alias) === false && !in_array($key, $fields, true)) {
$complexConditions = true;
break;
}

0 comments on commit c01525f

Please sign in to comment.
You can’t perform that action at this time.