Created
July 5, 2013 14:22
-
-
Save lsmith77/5934872 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
empty result | |
SELECT | |
n0.id AS id, | |
n0.path AS path, | |
n0.parent AS parent, | |
n0.local_name AS local_name, | |
n0.namespace AS namespace, | |
n0.workspace_name AS workspace_name, | |
n0.identifier AS identifier, | |
n0.type AS type, | |
n0.props AS props, | |
n0.depth AS depth, | |
n0.sort_order AS sort_order | |
FROM | |
phpcr_nodes n0 | |
WHERE | |
n0.workspace_name = ? | |
AND n0.type IN ('nt:unstructured', 'rep:root') | |
AND ( | |
( | |
EXTRACTVALUE( | |
n0.props, 'count(//sv:property[@sv:name="phpcr:class"]/sv:value[text()="Symfony\\Cmf\\Bundle\\ContentBundle\\Document\\MultilangStaticContent"]) > 0' | |
) | |
OR EXTRACTVALUE( | |
n0.props, 'count(//sv:property[@sv:name="phpcr:classparents"]/sv:value[text()="Symfony\\Cmf\\Bundle\\ContentBundle\\Document\\MultilangStaticContent"]) > 0' | |
) | |
) | |
AND ( | |
EXTRACTVALUE( | |
n0.props, 'count(//sv:property[@sv:name="phpcr:class"]/sv:value[text()="Symfony\\Cmf\\Bundle\\ContentBundle\\Document\\MultilangStaticContent"]) > 0' | |
) | |
OR EXTRACTVALUE( | |
n0.props, 'count(//sv:property[@sv:name="phpcr:classparents"]/sv:value[text()="Symfony\\Cmf\\Bundle\\ContentBundle\\Document\\MultilangStaticContent"]) > 0' | |
) | |
) | |
) | |
ORDER BY | |
EXTRACTVALUE( | |
n0.props, '//sv:property[@sv:name="path"]/sv:value[1]' | |
) ASC | |
expected result | |
SELECT | |
n0.id AS id, | |
n0.path AS path, | |
n0.parent AS parent, | |
n0.local_name AS local_name, | |
n0.namespace AS namespace, | |
n0.workspace_name AS workspace_name, | |
n0.identifier AS identifier, | |
n0.type AS type, | |
n0.props AS props, | |
n0.depth AS depth, | |
n0.sort_order AS sort_order | |
FROM | |
phpcr_nodes n0 | |
WHERE | |
n0.workspace_name = ? | |
AND n0.type IN ('nt:unstructured', 'rep:root') | |
AND ( | |
EXTRACTVALUE( | |
n0.props, '//sv:property[@sv:name="phpcr:class"]/sv:value[1]' | |
) = 'Symfony\Cmf\Bundle\ContentBundle\Document\MultilangStaticContent' | |
OR EXTRACTVALUE( | |
n0.props, '//sv:property[@sv:name="phpcr:classparents"]/sv:value[1]' | |
) = 'Symfony\Cmf\Bundle\ContentBundle\Document\MultilangStaticContent' | |
) | |
ORDER BY | |
EXTRACTVALUE( | |
n0.props, '//sv:property[@sv:name="path"]/sv:value[1]' | |
) ASC | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment