@@ -140,17 +140,17 @@ public function findDescendants(NodeKey $nodeKey, int $depth = 0, int $start = 1
140140 ->andwhere ('child.left_pos > parent.left_pos ' )
141141 ->andWhere ('child.right_pos < parent.right_pos ' )
142142 ->orderBy ('child.left_pos ' , 'ASC ' )
143- ->setParameter (': id ' , $ nodeKey ->getId ())
144- ->setParameter (': revision_id ' , $ nodeKey ->getRevisionId ());
143+ ->setParameter ('id ' , $ nodeKey ->getId ())
144+ ->setParameter ('revision_id ' , $ nodeKey ->getRevisionId ());
145145 if ($ start > 0 ) {
146146 $ query ->andWhere ('child.depth >= :start_depth + parent.depth ' )
147- ->setParameter (': start_depth ' , $ start );
147+ ->setParameter ('start_depth ' , $ start );
148148 }
149149 if ($ depth > 0 ) {
150150 $ query ->andWhere ('child.depth <= :depth + parent.depth ' )
151- ->setParameter (': depth ' , $ start + $ depth - 1 );
151+ ->setParameter ('depth ' , $ start + $ depth - 1 );
152152 }
153- $ stmt = $ query ->execute ();
153+ $ stmt = $ query ->executeQuery ();
154154 assert ($ stmt instanceof Result);
155155 while ($ row = $ stmt ->fetchAssociative ()) {
156156 $ descendants [] = new Node (new NodeKey ($ row ['id ' ], $ row ['revision_id ' ]), $ row ['left_pos ' ], $ row ['right_pos ' ], $ row ['depth ' ]);
0 commit comments