From e58c397bc9f1085bd7d66201b57be97f6ac64d89 Mon Sep 17 00:00:00 2001
From: nate <nate@cakephp.org>
Date: Sat, 1 Mar 2008 03:25:46 +0000
Subject: [PATCH] Adding fix for loading join models classes from plugins,
 fixes #4014

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6493 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 9739b3fbd..4f8625f6f 100644
--- a/cake/libs/model/model.php
+++ b/cake/libs/model/model.php
@@ -676,7 +676,7 @@ class Model extends Overloadable {
 					$this->{$joinClass}->primaryKey = $this->{$type}[$assocKey]['foreignKey'];
 
 				} else {
-					$this->__constructLinkedModel($plugin . $joinClass);
+					$this->__constructLinkedModel($joinClass, $plugin . $joinClass);
 					$this->{$joinClass}->primaryKey = $this->{$type}[$assocKey]['foreignKey'];
 					$this->{$type}[$assocKey]['joinTable'] = $this->{$joinClass}->table;
 				}