From f28b3c6efd793476498b92478a1657166b75e6a2 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 22 Nov 2009 21:26:25 -0500 Subject: [PATCH] Fixing failing tests on ModelIntegrationTest related to with keys with bound fields set not retaining the fields set. --- cake/libs/model/model.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cake/libs/model/model.php b/cake/libs/model/model.php index 953480478..0c3138602 100644 --- a/cake/libs/model/model.php +++ b/cake/libs/model/model.php @@ -748,8 +748,13 @@ class Model extends Overloadable { if (is_array($joinClass)) { $joinClass = key($joinClass); } - list($plugin, $joinClass) = pluginSplit($joinClass, true); - $this->{$type}[$assocKey]['with'] = $joinClass; + + $plugin = null; + if (strpos($joinClass, '.') !== false) { + list($plugin, $joinClass) = explode('.', $joinClass); + $plugin .= '.'; + $this->{$type}[$assocKey]['with'] = $joinClass; + } if (!ClassRegistry::isKeySet($joinClass) && $dynamicWith === true) { $this->{$joinClass} = new AppModel(array(