File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 360360 <sv : value >2</sv : value >
361361 </sv : property >
362362
363+ <sv : property sv : name =" longNumberToCompareMulti" sv : type =" Long" sv : multiple =" true" >
364+ <sv : value >4</sv : value >
365+ <sv : value >2</sv : value >
366+ <sv : value >8</sv : value >
367+ </sv : property >
368+
363369 <sv : property sv : name =" stringToCompare" sv : type =" String" >
364370 <sv : value >2</sv : value >
365371 </sv : property >
Original file line number Diff line number Diff line change @@ -172,6 +172,30 @@ public function testCompareNumberFields()
172172 $ this ->assertEquals (10 , $ rows [0 ]->getValue ('data.longNumberToCompare ' ));
173173 }
174174
175+ public function testCompareNumberFieldsMulti ()
176+ {
177+ $ query = $ this ->sharedFixture ['qm ' ]->createQuery ('
178+ SELECT data.longNumberToCompareMulti
179+ FROM [nt:unstructured] AS data
180+ WHERE data.longNumberToCompareMulti = 2
181+ AND ISDESCENDANTNODE([/tests_general_base])
182+ ' ,
183+ \PHPCR \Query \QueryInterface::JCR_SQL2
184+ );
185+ $ result = $ query ->execute ();
186+
187+ $ rows = array ();
188+ foreach ($ result ->getRows () as $ row ) {
189+ $ rows [] = $ row ;
190+ }
191+
192+ $ this ->assertCount (1 , $ rows );
193+
194+ // returning a string value is, perhaps suprisingly, the correct behavior.
195+ $ this ->assertEquals ('4 2 8 ' , $ rows [0 ]->getValue ('data.longNumberToCompareMulti ' ));
196+ }
197+
198+
175199 public function testCompareStringFields ()
176200 {
177201 $ query = $ this ->sharedFixture ['qm ' ]->createQuery (
You can’t perform that action at this time.
0 commit comments