ModeShape/modeshape — pull request #575 by rhauch (2012-10-17 23:13:24+00:00)
Title: MODE-1679 Corrected querying of REFERENCE properties

Reference properties were not being queried correctly: the tuple value of REFERENCE property was the string representation of the node key rather than the exposed identifier, so this corrects the BasicTupleCollector to properly process/generate the result set tuples for such properties. Additionally, multi-valued REFERENCE properties were not being joined properly, since the tuple contained the array of identifier strings and the join processing component was never looking for arrays.

A half-dozen new query tests were added to JcrQueryManagerTest that replicated all of these situations, including some of the more elementary queries that are involved in the joins and/or subqueries. Prior to these fixes, all of these tests failed. However, after the corrections were made, all of these tests pass.