From 1fbc3e6a9ba47bdee7bccad79e46767fac2cb2d2 Mon Sep 17 00:00:00 2001 From: gwoo Date: Fri, 29 Feb 2008 22:01:09 +0000 Subject: [PATCH] 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 --- cake/libs/model/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cake/libs/model/model.php b/cake/libs/model/model.php index 6065c7590..b3f98179d 100644 --- a/cake/libs/model/model.php +++ b/cake/libs/model/model.php @@ -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']) {