Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple query not working on property? #338

Open
alex-barylski opened this issue Jul 27, 2017 · 1 comment
Open

Simple query not working on property? #338

alex-barylski opened this issue Jul 27, 2017 · 1 comment

Comments

@alex-barylski
Copy link

I apologize if the issue is trivial - but I cannot seem to figure out why this is happening.

// THIS DOESN'T WORK?!?!
$sql = "SELECT * FROM [nt:unstructured] WHERE [nt:unstructured].[path] = '/index.html'";

// THIS WORKS FINE
//$sql = "SELECT * FROM [nt:unstructured] WHERE [nt:unstructured].[path] = '/work'";
$query = $queryManager->createQuery($sql, 'JCR-SQL2');

Here is the XML I am using to initialize PHPCR:

<cms xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0">
	<routes>
		<index path="/" slug="cms/types/pages" />
		<alias path="/index.html" slug="cms/types/pages" />
		<work path="/test" slug="http://test.com" />
	</routes>
</cms>

What am I doing wrong?

@dbu
Copy link
Member

dbu commented Jul 28, 2017

i fear that you run into an old bug that we never really sorted out: phpcr/phpcr-utils#104

if you have some time to investigate that stale pull request that would be awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants