updating model habtm saving, check against current hatbm aliases

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6099 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2007-11-30 23:31:41 +00:00
parent 00dc6dedb5
commit 64e7390a6b

View file

@ -1131,10 +1131,8 @@ class Model extends Overloadable {
return false;
}
$fields = $values = array();
$habtm = count($this->hasAndBelongsToMany);
foreach ($this->data as $n => $v) {
if (isset($v[$n]) && $habtm > 0) {
if (isset($v[$n]) && in_array($n, array_keys($this->hasAndBelongsToMany))) {
$joined[] = $v;
} else {
if ($n === $this->alias) {