Switch to new Nested Set model trait - October\Rain\Database\Traits\NestedTree

This commit is contained in:
Sam Georges 2014-06-13 18:34:54 +10:00
parent fbe23091b6
commit ff379f5ebf
1 changed files with 1 additions and 1 deletions

View File

@ -108,7 +108,7 @@ class Relation extends FormWidgetBase
$query->where($relatedObj->getKeyName(), '<>', $this->model->id);
}
if ($relatedObj->isClassExtendedWith('October.Rain.Database.Behaviors.NestedSetModel'))
if (in_array('October\Rain\Database\Traits\NestedTree', class_uses($relatedObj)))
$field->options = $query->listsNested($this->nameColumn, $relatedObj->getKeyName());
else
$field->options = $query->lists($this->nameColumn, $relatedObj->getKeyName());