File tree 1 file changed +25
-0
lines changed
1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -246,6 +246,31 @@ public function testQueryJoinReference()
246
246
$ this ->assertEquals (array ('13543fc6-1abf-4708-bfcc-e49511754b40 ' => '13543fc6-1abf-4708-bfcc-e49511754b40 ' ), $ vals );
247
247
}
248
248
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
+
249
274
public function testQueryOrder ()
250
275
{
251
276
/** @var $query QueryInterface */
You can’t perform that action at this time.
0 commit comments