phpcr / phpcr-utils

A set of helper classes and command line commands you want to use with phpcr, but that are not part of the API itself
phpcr.github.io
Other
72 stars 30 forks source link

Sql1QueryConverter does not encapsulate property names in square brackets #143

Open dantleech opened 9 years ago

dantleech commented 9 years ago

e.g. it produces the following:

SELECT s FROM nt:unstructured WHERE i18n:de-changer = 11

Which is invalid JCR-SQL2 it should be:

SELECT s FROM nt:unstructured WHERE [i18n:de-changer] = 11

This causes problems with Jackrabbit, but not doctrine-dbal which doesn't care.

Note that this is also specifically a problem for PHPCRSH when we perform UPDATEs. Normally queries to Jackrabbit are passed directly - bypassing the phpcr-utils SQL2 generation.

In PHPCRSH however we parse the UPDATE (and implicitly the SELECT) which reveals this issue.