phpcr/phpcr-shell

update query: shell aborts on unexpected syntax

Closed this issue · 1 comments

dbu commented

This query exits the shell with a stacktrace:

UPDATE [nt:unstructured] AS a INNER JOIN [nt:unstructured] AS t ON ISCHILDNODE(t, a) 
SET t.linkCaption = EXPR('row.getNode("a").getPropertyValue("linkCaption")') 
WHERE a.[phpcr:class] = 'Liipch\MagazineBundle\Document\Article' ;

trace:

Fatal error: Class 'PHPCR\Shell\Query\InvalidQueryException' not found in [project]/vendor/phpcr/phpcr-shell/src/PHPCR/Shell/Query/FunctionOperand.php on line 56
...
PHP  15. PHPCR\Shell\Query\UpdateProcessor->updateNode() [project]/vendor/phpcr/phpcr-shell/src/PHPCR/Shell/Console/Command/Phpcr/QueryUpdateCommand.php:91
PHP  16. PHPCR\Shell\Query\UpdateProcessor->handleFunction() [project]/vendor/phpcr/phpcr-shell/src/PHPCR/Shell/Query/UpdateProcessor.php:92
PHP  17. PHPCR\Shell\Query\FunctionOperand->execute() [project]/vendor/phpcr/phpcr-shell/src/PHPCR/Shell/Query/UpdateProcessor.php:101
dbu commented

sorry, this bug is only in alpha versions, beta3 works