File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -246,6 +246,31 @@ public function testQueryJoinReference()
246246 $ this ->assertEquals (array ('13543fc6-1abf-4708-bfcc-e49511754b40 ' => '13543fc6-1abf-4708-bfcc-e49511754b40 ' ), $ vals );
247247 }
248248
249+ public function testQueryJoinChildnode ()
250+ {
251+ /** @var $query QueryInterface */
252+ $ query = $ this ->sharedFixture ['qm ' ]->createQuery ('
253+ SELECT [nt:unstructured].longNumber
254+ FROM [nt:file]
255+ INNER JOIN [nt:unstructured]
256+ ON ISCHILDNODE([nt:unstructured], [nt:file])
257+ WHERE [nt:unstructured].longNumber = 999
258+ AND ISDESCENDANTNODE([nt:file], [/tests_general_base])
259+ ' ,
260+ QueryInterface::JCR_SQL2
261+ );
262+
263+ $ this ->assertInstanceOf ('\PHPCR\Query\QueryInterface ' , $ query );
264+ $ result = $ query ->execute ();
265+ $ this ->assertInstanceOf ('\PHPCR\Query\QueryResultInterface ' , $ result );
266+ $ vals = array ();
267+
268+ foreach ($ result ->getRows () as $ row ) {
269+ $ vals [] = $ row ->getValue ('nt:unstructured.longNumber ' );
270+ }
271+ $ this ->assertEquals (array (999 ), $ vals );
272+ }
273+
249274 public function testQueryOrder ()
250275 {
251276 /** @var $query QueryInterface */
You can’t perform that action at this time.
0 commit comments