Prefix fields with model alias

This commit is contained in:
ADmad 2015-03-04 21:11:18 +05:30
parent 63769ae4a6
commit a1286e9e7d

View file

@ -132,8 +132,8 @@ class TreeBehavior extends ModelBehavior {
$depths[$node[$Model->alias][$primaryKey]] = $depth;
$Model->updateAll(
array($settings['level'] => $depth),
array($primaryKey => $node[$Model->alias][$primaryKey])
array($Model->escapeField($settings['level']) => $depth),
array($Model->escapeField($primaryKey) => $node[$Model->alias][$primaryKey])
);
}
}