-
Notifications
You must be signed in to change notification settings - Fork 29
Closed
Milestone
Description
moved from phpcr/phpcr#21
When using the QOM, the user should not need to know about escaping in SQL2. But when you do something like the following you still need the brackets:
$qomFactory->fulltextSearch('title', 'The', '[nt:unstructured]');
Without square brackets jackrabbit throws:
HTTP 400: Query:
SELECT * FROM [nt:unstructured] WHERE CONTAINS(nt:(*)unstructured.title, 'Team') AND [phpcr:class] = 'Sandbox\MainBundle\Document\EditableStaticContent' ORDER BY path ASC; expected: ,
looking through this https://github.com/phpcr/phpcr-utils/blob/master/src/PHPCR/Util/QOM/Sql2Generator.php i see many places where a name without [] is created. maybe we need more validation too. QueryBuilder seems to expect namespaced names whereas Sql2Generator seems to have 2 parameters if i understand correctly.
Metadata
Metadata
Assignees
Labels
No labels