Browse Source

Use Table::aliasField() method

ADmad 10 years ago
parent
commit
d7a8e3ed0e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/ORM/Behavior/TreeBehavior.php

+ 1 - 1
src/ORM/Behavior/TreeBehavior.php

@@ -737,7 +737,7 @@ class TreeBehavior extends Behavior
 
         $node = $this->_scope($this->_table->find())
             ->select($fields)
-            ->where([$this->_table->alias() . '.' . $primaryKey => $id])
+            ->where([$this->_table->aliasField($primaryKey) => $id])
             ->first();
 
         if (!$node) {