File tree 2 files changed +30
-0
lines changed
2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 360
360
<sv : value >2</sv : value >
361
361
</sv : property >
362
362
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
+
363
369
<sv : property sv : name =" stringToCompare" sv : type =" String" >
364
370
<sv : value >2</sv : value >
365
371
</sv : property >
Original file line number Diff line number Diff line change @@ -172,6 +172,30 @@ public function testCompareNumberFields()
172
172
$ this ->assertEquals (10 , $ rows [0 ]->getValue ('data.longNumberToCompare ' ));
173
173
}
174
174
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
+
175
199
public function testCompareStringFields ()
176
200
{
177
201
$ query = $ this ->sharedFixture ['qm ' ]->createQuery (
You can’t perform that action at this time.
0 commit comments