diff --git a/fixtures/general/base.xml b/fixtures/general/base.xml
index 0cb61cfd..cb02b339 100644
--- a/fixtures/general/base.xml
+++ b/fixtures/general/base.xml
@@ -104,6 +104,11 @@
text/plain
+
+ foo
+ bar
+
+
nt:unstructured
diff --git a/tests/06_Query/QuerySql2OperationsTest.php b/tests/06_Query/QuerySql2OperationsTest.php
index 13acae83..01215d87 100644
--- a/tests/06_Query/QuerySql2OperationsTest.php
+++ b/tests/06_Query/QuerySql2OperationsTest.php
@@ -138,4 +138,26 @@ public function testQueryOrder()
$this->assertEquals(array(null, null, null, null, null, null, null, 0), $vals);
}
+ public function testQueryMultiValuedProperty()
+ {
+ /** @var $query \PHPCR\Query\QueryInterface */
+ $query = $this->sharedFixture['qm']->createQuery(
+ 'SELECT data.tags
+ FROM [nt:unstructured] AS data
+ WHERE data.tags = "foo"
+ AND data.tags = "bar"
+ ',
+ \PHPCR\Query\QueryInterface::JCR_SQL2
+ );
+
+ $this->assertInstanceOf('\PHPCR\Query\QueryInterface', $query);
+ $result = $query->execute();
+ $this->assertInstanceOf('\PHPCR\Query\QueryResultInterface', $result);
+
+ $rows = $result->getRows();
+
+ $this->assertCount(1, $rows, 'Expected one row with both tags present');
+ $this->assertSame('foo bar', $rows->current()->getValue('tags'));
+ }
+
}