mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Fixing failing tests on ModelIntegrationTest related to with keys with bound fields set not retaining the fields set.
This commit is contained in:
parent
f038cb8ffb
commit
f28b3c6efd
1 changed files with 7 additions and 2 deletions
|
@ -748,8 +748,13 @@ class Model extends Overloadable {
|
||||||
if (is_array($joinClass)) {
|
if (is_array($joinClass)) {
|
||||||
$joinClass = key($joinClass);
|
$joinClass = key($joinClass);
|
||||||
}
|
}
|
||||||
list($plugin, $joinClass) = pluginSplit($joinClass, true);
|
|
||||||
|
$plugin = null;
|
||||||
|
if (strpos($joinClass, '.') !== false) {
|
||||||
|
list($plugin, $joinClass) = explode('.', $joinClass);
|
||||||
|
$plugin .= '.';
|
||||||
$this->{$type}[$assocKey]['with'] = $joinClass;
|
$this->{$type}[$assocKey]['with'] = $joinClass;
|
||||||
|
}
|
||||||
|
|
||||||
if (!ClassRegistry::isKeySet($joinClass) && $dynamicWith === true) {
|
if (!ClassRegistry::isKeySet($joinClass) && $dynamicWith === true) {
|
||||||
$this->{$joinClass} = new AppModel(array(
|
$this->{$joinClass} = new AppModel(array(
|
||||||
|
|
Loading…
Add table
Reference in a new issue