From b42373467f19085d7b188be7e8cddcd299511a09 Mon Sep 17 00:00:00 2001 From: phpnut Date: Fri, 3 Nov 2006 21:01:24 +0000 Subject: [PATCH] Adding fix for scaffold when using an alias association, mostly found on self joined models, or models that have multiple associations to the same model git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3820 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 48f6844c6..c4ea13bb2 100644 --- a/cake/libs/model/model.php +++ b/cake/libs/model/model.php @@ -590,7 +590,7 @@ class Model extends Overloadable { } $this->alias[$assoc] = $this->{$assoc}->table; - $this->tableToModel[$this->{$assoc}->table] = $assoc; + $this->tableToModel[$this->{$assoc}->table] = $className; $this->modelToTable[$assoc] = $this->{$assoc}->table; } /**