Fix incorrect alias/name usage.

Fixes #2317
This commit is contained in:
mark_story 2011-11-29 20:42:44 -05:00
parent 8568ac6613
commit 992a1554e1

View file

@ -562,7 +562,7 @@ class TreeBehavior extends ModelBehavior {
$Model->recursive = $recursive;
if ($mode == 'parent') {
$Model->bindModel(array('belongsTo' => array('VerifyParent' => array(
'className' => $Model->alias,
'className' => $Model->name,
'foreignKey' => $parent,
'fields' => array($Model->primaryKey, $left, $right, $parent),
))));
@ -770,7 +770,7 @@ class TreeBehavior extends ModelBehavior {
}
$Model->bindModel(array('belongsTo' => array('VerifyParent' => array(
'className' => $Model->alias,
'className' => $Model->name,
'foreignKey' => $parent,
'fields' => array($Model->primaryKey, $left, $right, $parent)
))));