quick fix for with and saveMulti

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6490 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2008-02-29 22:01:09 +00:00
parent 394322f35d
commit 1fbc3e6a9b

View file

@ -1191,7 +1191,7 @@ class Model extends Overloadable {
$newValues = array();
if (isset($this->hasAndBelongsToMany[$assoc])) {
list($join) = $this->joinModel($this->hasAndBelongsToMany[$assoc]['with']);
$conditions = array($this->hasAndBelongsToMany[$assoc]['foreignKey'] => $id);
$conditions = array($join . '.' . $this->hasAndBelongsToMany[$assoc]['foreignKey'] => $id);
$links = array();
if ($this->hasAndBelongsToMany[$assoc]['unique']) {