mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Closes #5591.
Modified models in models.php setting the with key since these models are not used unless the with key is defined in the association. git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7740 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
f139b0312f
commit
4c2a3ee02f
2 changed files with 3 additions and 2 deletions
|
@ -618,9 +618,9 @@ class Model extends Overloadable {
|
|||
function __generateAssociation($type) {
|
||||
foreach ($this->{$type} as $assocKey => $assocData) {
|
||||
$class = $assocKey;
|
||||
$dynamicWith = false;
|
||||
|
||||
foreach ($this->__associationKeys[$type] as $key) {
|
||||
$dynamicWith = false;
|
||||
|
||||
if (!isset($this->{$type}[$assocKey][$key]) || $this->{$type}[$assocKey][$key] === null) {
|
||||
$data = '';
|
||||
|
|
|
@ -1023,6 +1023,7 @@ class Node extends CakeTestModel{
|
|||
'ParentNode' => array(
|
||||
'className' => 'Node',
|
||||
'joinTable' => 'dependency',
|
||||
'with' => 'Dependency',
|
||||
'foreignKey' => 'child_id',
|
||||
'associationForeignKey' => 'parent_id',
|
||||
)
|
||||
|
@ -2335,7 +2336,7 @@ class Content extends CakeTestModel {
|
|||
* @var array
|
||||
* @access public
|
||||
*/
|
||||
var $hasAndBelongsToMany = array('Account' => array('className' => 'Account', 'joinTable' => 'ContentAccounts', 'foreignKey' => 'iContentId', 'associationForeignKey', 'iAccountId'));
|
||||
var $hasAndBelongsToMany = array('Account' => array('className' => 'Account', 'with' => 'ContentAccount', 'joinTable' => 'ContentAccounts', 'foreignKey' => 'iContentId', 'associationForeignKey', 'iAccountId'));
|
||||
}
|
||||
/**
|
||||
* Nonconformant Account class
|
||||
|
|
Loading…
Reference in a new issue