Merge pull request #233 from tPl0ch/2.0-model

Removed unnessecary call to array_merge() in Model::_deleteLinks().
This commit is contained in:
Renan Gonçalves aka renan.saddam 2011-10-07 06:08:40 -07:00
commit a8af97858c

View file

@ -2278,7 +2278,7 @@ class Model extends Object {
foreach ($this->hasAndBelongsToMany as $assoc => $data) {
list($plugin, $joinModel) = pluginSplit($data['with']);
$records = $this->{$joinModel}->find('all', array(
'conditions' => array_merge(array($this->{$joinModel}->escapeField($data['foreignKey']) => $id)),
'conditions' => array($this->{$joinModel}->escapeField($data['foreignKey']) => $id),
'fields' => $this->{$joinModel}->primaryKey,
'recursive' => -1,
'callbacks' => false